home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 9 / The PC-SIG Library on CD ROM - Ninth Edition.iso / 801_900 / DISK0873 / DISK0873.ZIP / BOSS_DOC.LZH / BOSS.MAN next >
Text File  |  1990-06-17  |  311KB  |  10,122 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                  The Window BOSS
  13.                                         &
  14.                                    Data Clerk
  15.  
  16.  
  17.                                 Revision 07.01.90
  18.                                   Version 5.17
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                          Star Guidance Consulting, Inc.
  25.                                  273 Windy Drive
  26.                           Waterbury, Connecticut 06705
  27.  
  28.                                  (203) 574-2449
  29.  
  30.  
  31.  
  32.  
  33.                                _______
  34.                           ____|__     |               (tm)
  35.                        --|       |    |-------------------
  36.                          |   ____|__  |  Association of
  37.                          |  |       |_|  Shareware
  38.                          |__|   o   |    Professionals
  39.                        -----|   |   |---------------------
  40.                             |___|___|    MEMBER
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                 Copyright (c) 1984-1990 by Philip A. Mongelluzzo
  47.                                All Rights Reserved.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.         The Window BOSS Shareware diskette,  containing a copy of this 
  54.         manual  may  be freely copied and shared,  but printed copies  of 
  55.         this document may not be copied in any way without permission  in 
  56.         writing from Star Guidance Consulting.  Thank you.  
  57.                                                      The Window BOSS
  58.  
  59.  
  60.  
  61.         1. Introduction
  62.  
  63.         The Window BOSS is one of the most powerful and cost-effective 
  64.         products available to enhance and accelerate the development of 
  65.         system and applications programs in the "C" language.  The BOSS 
  66.         will let you create programs that have the same look and feel as 
  67.         top sellers like Lotus 1-2-3, Sidekick, dBASE III, and Framework!  
  68.         Pop-up windows, pull down menus, status lines, and in context on-
  69.         line help functions can be easily implemented.  Your applications 
  70.         can drag windows around the screen and automatically sense the 
  71.         video card installed.  All of this without snow, flicker, or 
  72.         delay! 
  73.  
  74.         The BOSS's assistant, The Data Clerk is always on call to handle 
  75.         the tasks associated with data entry.  Whether they be as simple 
  76.         as fetching a line of text or as complicated as the coordination 
  77.         of filling out a form, the Data Clerk will be there to assist, 
  78.         and if necessary, validate precious information as it is entered.
  79.  
  80.         Registered users can take advantage of our "Source Plus" policy 
  81.         that provides meticulously commented source code, technical 
  82.         support, and minimal fee updates.
  83.  
  84.         2. Technical Nitty Gritties
  85.  
  86.         The Window BOSS supports PC/MSDOS for the IBM PC/XT/AT, PS/2 and 
  87.         compatibles.   However, you'll need one of the following 
  88.         compilers in order to take advantage of the state-of-the-art 
  89.         techniques available from the BOSS:
  90.  
  91.                              Lattice C, Microsoft C
  92.                        Microsoft Quick C, Borland Turbo C
  93.                       Computer Innovations CI86, Datalight     
  94.                        Watcom & Watcom Express C, Zortech
  95.                               Aztec C, Mix Power C
  96.  
  97.         The BOSS is written in "C" and assembly language.  You'll need 
  98.         the Microsoft Assembler, MASM, to assemble any local changes to 
  99.         the assembler source.
  100.  
  101.           Stats:
  102.  
  103.              Maximum windows:    limited only by compiler and memory
  104.              Maximum window:     full screen (25x80, 43x80, 50x80)
  105.              Minimum window:     1 row 1 column (borderless)
  106.                                  3 rows 3 columns (framed)
  107.              Minimum fields:     none
  108.              Maximum fields:     limited only by compiler and memory
  109.  
  110.           Operation:
  111.  
  112.              Simply include the library at link time and invoke the 
  113.              function desired.  
  114.  
  115.  
  116.  
  117.                                                            Page: 1
  118.                                                      The Window BOSS
  119.  
  120.  
  121.  
  122.         3. User Supported Software
  123.  
  124.         Star Guidance Consulting distributes The Window BOSS with a 
  125.         unique marketing approach called Shareware.  The Shareware 
  126.         diskette with the programs and manual may be freely copied and 
  127.         shared.  It is also available from Star Guidance for $20.00. We 
  128.         ask you to help us distribute The Window BOSS by sharing 
  129.         unmodified copies of the Shareware diskette with others.  We also 
  130.         encourage you to register your copy for $55.00.  You'll find a 
  131.         registration form at the end of this manual.  Thank you for your 
  132.         support and enjoy the BOSS.  
  133.  
  134.         3.1. Registering
  135.  
  136.         Shareware is a term for software that can be freely copied and 
  137.         shared.  The term describes copyrighted software which the author 
  138.         supports and encourages people to copy and share.
  139.  
  140.         Shareware is like public television:  the programming is freely 
  141.         distributed, but support from users is encouraged.  The concept 
  142.         is based on these principles:
  143.  
  144.           1. People need to try programs to see if they are useful.
  145.           2. Software authors can be supported directly by users.
  146.           3. Copying and networking of programs can be encouraged.
  147.  
  148.         We encourage you to register your copy of The Window BOSS for 
  149.         $55.00.  Registration has a number of benefits to you:
  150.  
  151.           1. Serialized diskette containing all source code for all 
  152.              supported compilers.
  153.           2. Telephone Support and minimal fee updates. Minimal fees 
  154.              cover the cost of media, packaging materials, shipping, 
  155.              handling, and update preparation.
  156.           3. Thanks from us for your support and encouragement!
  157.  
  158.         3.2. Support Services
  159.  
  160.         You may call, write, or use one of the supported commercial 
  161.         services (CompuServe, GENIE, BIX) to obtain support and 
  162.         assistance. Unless the problem is relatively complex, you will 
  163.         get the best results by calling. Electronic mailboxes are checked 
  164.         on daily basis (excluding weekends & holidays) and are a very 
  165.         effective way of communicating. Electronic mailboxes are great 
  166.         for passing problem code samples and receiving work-arounds 
  167.         and/or problem specific updates. If you write, please include a 
  168.         phone number and the times when you will be available. Our 
  169.         response to written questions is much slower, but we do give 
  170.         priority to overseas users. We are available between 9AM and 5PM 
  171.         Monday through Friday, and sometimes on Saturday and Sunday.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                                            Page: 2
  179.                                                      The Window BOSS
  180.  
  181.  
  182.  
  183.         Support Services - continued.
  184.  
  185.  
  186.  
  187.         With reference to calls, if we do not call back, please remember 
  188.         that about 20% of our call backs do not get completed because of 
  189.         faulty phone numbers, unanswered, or busy phones. If we have not 
  190.         called back within 1 business day, call us again.  Frequent, 
  191.         difficult to reach, or foreign callers can expect "person to 
  192.         person" collect return calls.
  193.  
  194.         3.2.1. Electronic Support
  195.  
  196.         Electronic support is provided on GENIE, CompuServe, and BIX.
  197.         Support previously provided by our BBS is now provided on these 
  198.         services.  You are strongly advised to obtain a USER ID on at 
  199.         least one of these fine services as no other form of electronic 
  200.         support can be provided.
  201.  
  202.         On GENIE, a special topic on the IBM PC Round Table Bulletin 
  203.         Board has been set up to provide support to Window BOSS users.  
  204.         The Window BOSS topic can be found in the "On-Line Product 
  205.         Support" category of the Bulletin Board.  As of this writing, 
  206.         the IBM PC Round Table main menu is page 615 and the "On-Line 
  207.         Product Support" category is category # 9 of the Round Table's 
  208.         Bulletin Board.  Simply move to page 615 by typing "M 615", 
  209.         select the IBM PC Round Table Bulletin Board from the menu by 
  210.         typing "1", then SET the category by typing "SET 9".  Reading and 
  211.         entering messages is straight forward. The on-line help system 
  212.         and GENIE's user guide should assist you if you have questions.  
  213.         If you prefer, you can leave mail addressed to MONGELLUZZO.  
  214.         Round Table and Mail messages are answered on a daily basis.  If 
  215.         you need information on obtaining a GENIE account  you can call 
  216.         GENIE toll free at 800-638-9636.
  217.  
  218.         CompuServe electronic correspondence is limited to EMAIL.  Our 
  219.         EMAIL ID is [71565,1001].  SIG(s) are also occasionally checked 
  220.         for messages but should not be considered a vehicle for effective 
  221.         communication to Star Guidance.  If you are a CompuServe user and 
  222.         you need to reach us, use EMAIL.  EMAIL messages are answered on 
  223.         a daily basis.  If you need information on obtaining a CompuServe 
  224.         account you can call CompuServe toll free at 800-848-8199.
  225.  
  226.         BIX electronic correspondence is limited to Electronic Mail.  Our 
  227.         BIX NAME is "pmongelluzzo". The conference areas in the 
  228.         "ibm.exchange" are also occasionally checked for messages but 
  229.         should not be considered a vehicle for effective communication to 
  230.         Star Guidance.  If you are a BIX user and you need to reach us, 
  231.         use EMAIL.  EMAIL messages are answered on a daily basis.  If you 
  232.         need information on BIX can reach them at 800-227-2983 (in 
  233.         New Hampshire and outside the United States call 603-924-2983).
  234.  
  235.  
  236.  
  237.  
  238.  
  239.                                                            Page: 3
  240.                                                      The Window BOSS
  241.  
  242.  
  243.  
  244.         4. The Basics
  245.  
  246.         The Window BOSS is an extensive library of C functions for the 
  247.         creation, the management and the manipulation of text windows.  
  248.         We take care of all the housekeeping and let you, the programmer, 
  249.         get on with developing your application with a minimum of fuss.
  250.  
  251.         Both The Window BOSS and The Data Clerk are based on a layered 
  252.         software design in which powerful, easy to use functions are 
  253.         created from a series of lower level primitives.  As a 
  254.         programmer, you will quickly appreciate our clean and uncluttered 
  255.         approach to getting the job done.
  256.  
  257.         Windows are created and defined by opening them. Once created, 
  258.         you can write to them, move them around, change their attributes, 
  259.         use them as the basis for data entry, or "kill" them by closing 
  260.         them.  Windows are nothing more than a sub display of a larger 
  261.         display - the physical screen.  They are defined to have size, 
  262.         location, and attributes like foreground color, background color, 
  263.         border colors and so on.  The BOSS includes a whole host of 
  264.         functions for defining and manipulating your windows.
  265.  
  266.         Windows can also serve as the backdrop for data entry.  Once a 
  267.         window is created, you can use it to convey information or to 
  268.         retrieve it!  The Data Clerk will assist you in obtaining the 
  269.         desired goal, whether it be as simple as a single line of text or 
  270.         as complex as a complete form. 
  271.  
  272.         Forms are an ordered collection of input requests (fields) that 
  273.         occur within a specific window.  Fields have size, location 
  274.         (relative to the window which they will be displayed in), and 
  275.         attributes (foreground color, background color, mask values, fill 
  276.         characters, type [integer, float, long, text], validation 
  277.         ranges and so on).  Like windows, forms are created by opening 
  278.         them.  Their contents must then be defined by using the field 
  279.         definition functions provided, or with your own custom field 
  280.         definition functions.  Once created and defined, a form becomes 
  281.         part of the window and moves with it. Forms are "killed" by 
  282.         closing them (n.b. killing a form has no effect on the window to 
  283.         which it was anchored or to the information displayed in it, form 
  284.         or otherwise). The same functions used to input single data items 
  285.         are used to build forms.  This consistency, coupled with an 
  286.         uncluttered approach and flexibility, gives The Window BOSS its 
  287.         power.    
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.                                                            Page: 4
  301.                                                      The Window BOSS
  302.  
  303.  
  304.  
  305.         4.1. Window Basics
  306.  
  307.         Here is the famous "hello" program!  As you can see it's pretty 
  308.         simple to get windows into your applications with The Window 
  309.         BOSS!!  You should review this code in conjunction with the 
  310.         function descriptions found in this manual and the concepts 
  311.         outlined in the Important Concepts section following the 
  312.         examples.
  313.  
  314.         #include "windows.h"            /* REQUIRED */
  315.         main()
  316.         {
  317.         WINDOWPTR w1;                   /* window handle */
  318.         int batrib;                     /* border atrib */
  319.         int watrib;                     /* window atrib */
  320.  
  321.         /*
  322.          * Set attributes:
  323.          *
  324.          *      border - blue/white box
  325.          *      window - white background/black letters
  326.          *
  327.         */
  328.  
  329.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  330.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  331.  
  332.         /*
  333.          * Open window at 0,0 - 25 cells wide and 10 cells high
  334.         */
  335.  
  336.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  337.           if(!w1) exit();       
  338.  
  339.         /*
  340.          * Print the famous string and wait for key to be struck.
  341.          * Close window on key strike.. exit.
  342.         */
  343.  
  344.           wn_printf(w1,"Hello World...");
  345.           v_getch();                    /* wait for key */
  346.           wn_close(w1);                 /* close the window */
  347.           exit(0);                      /* and exit */
  348.         }
  349.  
  350.         /* End */
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                                                            Page: 5
  362.                                                      The Window BOSS
  363.  
  364.  
  365.  
  366.         4.2. Data Entry Basics
  367.  
  368.         Lets expand our "hello" program to prompt and fetch a name.
  369.  
  370.         #include "windows.h"            /* REQUIRED */
  371.         main()
  372.         {
  373.         WINDOWPTR w1;                   /* window handle */
  374.         int batrib;                     /* border atrib */
  375.         int watrib;                     /* window atrib */
  376.         char name[15];                  /* name */
  377.  
  378.         /*
  379.          * Set attributes:
  380.          *
  381.          *      border - blue/white box
  382.          *      window - white background/black letters
  383.          *
  384.         */
  385.  
  386.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  387.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  388.  
  389.         /*
  390.          * Open window at 0,0 - 25 cells wide and 10 cells high
  391.         */
  392.  
  393.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  394.           if(!w1) exit();       
  395.  
  396.         /*
  397.          * Print the famous string, prompt and fetch a name, 
  398.          * wait for key to be struck.
  399.          * Close window on key strike.. exit.
  400.         */
  401.  
  402.           wn_printf(w1,"Hello World...");
  403.  
  404.           *name = NUL;                  /* init buffer for name */
  405.           wn_gtext(XEQ,NFRM,NFLD,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  406.  
  407.           v_getch();                    /* wait for key */
  408.           wn_close(w1);                 /* close the window */
  409.           exit(0);                      /* and exit */
  410.         }
  411.  
  412.         /* End */
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.                                                            Page: 6
  423.                                                      The Window BOSS
  424.  
  425.  
  426.  
  427.         4.3. Form Basics
  428.  
  429.         Now we will expand a bit further to read a 2 field form.
  430.  
  431.         #include "windows.h"            /* REQUIRED */
  432.         main()
  433.         {
  434.         WINDOWPTR w1;                   /* window handle */
  435.         WIFORM f1;                      /* form handle */
  436.         int batrib;                     /* border atrib */
  437.         int watrib;                     /* window atrib */
  438.         char name[15];                  /* name */
  439.         char city[15];                  /* city */
  440.  
  441.         /*
  442.          * Set attributes:
  443.          *
  444.          *      border - blue/white box
  445.          *      window - white background/black letters
  446.          *
  447.         */
  448.  
  449.           batrib = (BLUE << 4) | WHITE; /* border atrib */
  450.           watrib = (WHITE <<4) | BLACK; /* window atrib */
  451.  
  452.         /*
  453.          * Open window at 0,0 - 25 cells wide and 10 cells high
  454.         */
  455.  
  456.           w1 = wn_open(0,0,0,25,10,watrib,batrib);
  457.           if(!w1) exit();       
  458.  
  459.         /*
  460.          * Print the famous string, create, define, and fetch form
  461.          * wait for key to be struck.
  462.          * Close window on key strike.. exit.
  463.         */
  464.  
  465.           wn_printf(w1,"Hello World...");
  466.  
  467.           *name = NUL;                  /* init buffer for name */
  468.           *city = NUL;                  /* init buffer for city */
  469.           f1 = wn_frmopn(3);            /* open form 2 + 1 Fields */
  470.           wn_gtext(SET,f1,0,w1,2,1,"Name: ",watrib,'_',15,name,NSTR,NSTR);
  471.           wn_gtext(SET,f1,1,w1,3,1,"City: ",watrib,'_',15,city,NSTR,NSTR);
  472.           wn_frmget(f1);                /* read the form */
  473.  
  474.           v_getch();                    /* wait for key */
  475.           wn_frmcls(f1);                /* first close the form */
  476.           wn_close(w1);                 /* then close the window */
  477.           exit(0);                      /* and exit */
  478.         }
  479.  
  480.  
  481.  
  482.  
  483.                                                            Page: 7
  484.                                                      The Window BOSS
  485.  
  486.  
  487.  
  488.         4.4. Popup Menu Basics
  489.  
  490.         Popup and pulldown menus add that extra sparkle to your 
  491.         applications.  The Window BOSS includes a simple popup menu 
  492.         system that is fast and easy to use.  The system consists of two 
  493.         functions; wn_popup() and wn_qpopup().  wn_popup() is an 
  494.         interactive version of wn_qpopup().  That is to say that 
  495.         wn_popup() can be used to solicit user input while wn_qpopup is a 
  496.         *information only* popup.  The "q" in qpopup stands for 'quick'.  
  497.         Both functions have function parameters and require the menu 
  498.         structure "pmenu" to be initialized.  "pmenu" is defined in 
  499.         "windows.h".
  500.  
  501.         Popup menus, like windows, have size (height & width), an origin 
  502.         (row & column), and attributes (text & border).  These are passed 
  503.         as parameters to both wn_popup and wn_qpopup in the same fashion 
  504.         as they would be for a call to wn_open.  In addition to the 
  505.         normal window stuff, popup menus also have information that needs 
  506.         to be displayed and, in some cases, information that needs to be 
  507.         returned, to the calling function.  This additional information 
  508.         is passed to popup via the pmenu structure.  The pmenu structure 
  509.         allows us to tell wn_popup what text is to be displayed where, 
  510.         and what value (return code), if any, is to be provided back to 
  511.         the calling function.
  512.  
  513.         Both wn_popup and wn_qpopup call wn_open to open a window defined 
  514.         by the calling parameters. Calls to wn_putsa are then made to 
  515.         display the text defined in pmenu within the window just opened 
  516.         at the location in the window specified by the values defined in 
  517.         pmenu.  A menu item is highlighted by moving either the cursor 
  518.         keys, space bar, or by pressing the first character of the menu 
  519.         item desired.  Control is passed back to the calling function 
  520.         when the 'Enter' or 'Escape' key is pressed. Here is a typical 
  521.         call to wn_popup:
  522.  
  523.             wat = (WHITE<<4|BLACK);
  524.             bat = (BLUE<<4|WHITE); 
  525.             rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  526.                           |                       |  |     |  |   |
  527.                           +-------\/--------------+  |     |  |   |
  528.                              Normal wn_open parms    |     |  |   |
  529.                                                      |     |  |   |
  530.                                   pmenu structure  <-+-----+  |   |
  531.                                                               |   |
  532.                                         window close flag   <-+---+
  533.  
  534.         The normal wn_open parameters define the popup menu's location, 
  535.         size, and color.  The pmenu structure address allows wn_popup and 
  536.         wn_qpopup to access the contents of the intelc pmenu structure.  
  537.         The window close flag is used to tell wn_popup whether or not to 
  538.         close the popup menu when returning to the calling function. 
  539.         Telling wn_popup to not to close the menu when returning to the 
  540.         calling function allows you to create nested popups.
  541.  
  542.  
  543.  
  544.                                                            Page: 8
  545.                                                      The Window BOSS
  546.  
  547.  
  548.  
  549.         Popup Menu Basics - continued.
  550.  
  551.  
  552.  
  553.         Lets examine the pmenu structure definition from windows.h:
  554.  
  555.           struct mitem {              /* POPUP menu item template */
  556.             int r;                    /* row */
  557.             int c;                    /* col */
  558.             char *t;                  /* text */
  559.             int rv;                   /* return value */
  560.           };
  561.  
  562.           struct pmenu {              /* POPUP menu structure */
  563.             WINDOWPTR wpsave;         /* place to hold window id */
  564.             int winopn;               /* leave window open flag */
  565.             int lndx;                 /* last index */
  566.             int fm;                   /* first menu item index */
  567.             int lm;                   /* last menu item index */
  568.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  569.           };                          /* NOTE RELATIVE LIMIT */
  570.  
  571.           mitem - Popup menus contain a number of menu items. Each menu 
  572.           item has a location (within the window), text (to be displayed 
  573.           in the window), and an integer return code that is passed back 
  574.           to the calling function to let the caller know which menu item 
  575.           was selected.  "r" and "c" define the row and column, "t" is a 
  576.           pointer to the text, and rv is integer return code.
  577.              
  578.           pmenu - In addition to the information needed about each menu 
  579.           item, we need to do some internal housekeeping on the popup 
  580.           menu itself.  "wpsave" is used to store the WINDOWPTR that was 
  581.           returned from the call to wn_open made by popup. "winopn" is 
  582.           used internally by popup as an indicator of whether or not the 
  583.           window referenced by wpsave is currently open.  "lndx" is used 
  584.           internally to hold the index of the menu item last referenced 
  585.           or selected.  The combination of "wpsave", "winopn", and "lndx" 
  586.           provide wn_popup with the ability to correctly handle both 
  587.           nested and non-nested popups.  The structure members "wpsave", 
  588.           "winopn", "lndx" should not be modified, only initialized. 
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.                                                            Page: 9
  606.                                                      The Window BOSS
  607.  
  608.  
  609.  
  610.         Popup Menu Basics - continued.
  611.  
  612.  
  613.  
  614.           The Window BOSS's popup menus allow you to have informational 
  615.           headers and trailers.  This is handy for providing multiple 
  616.           line titles and or trailing instructional messages.  Consider 
  617.           the following:
  618.  
  619.              +---------------------------------+
  620.              |                                 |
  621.              |           Intellicom            |   <- Informational
  622.              |          Quick - Help           |   <- Informational
  623.              |                                 |
  624.              |     1 General Information       |   <- Action item
  625.              |     2 Terminal Mode Options     |   <- Action item
  626.              |     3 XMODEM File Send          |   <- Action item
  627.              |     4 XMODEM File Receive       |   <- Action item
  628.              |     5 CompuServe Exec Mode      |   <- Action item  
  629.              |                                 |
  630.              |  Press: ESC to quit or Cursor   |   <- Informational
  631.              |   Keys to Position Cursor then  |   <- Informational 
  632.              |   press RETURN for MORE info.   |   <- Informational
  633.              |                                 |
  634.              +---------------------------------+
  635.  
  636.           In the above popup there are 10 menu items, 5 are action 
  637.           oriented, and 5 are informational.  They are numbered 0 through 
  638.           9 and correspond to the "scrn" array of pointers in the pmenu 
  639.           structure. "fm" and "lm" are the indexes of the first and last 
  640.           action items in scrn array.  In the case of the above popup, fm 
  641.           and lm would be initialized to 2 and 6 respectively. "fm" and 
  642.           "lm", like the other housekeeping structure members should not 
  643.           be modified only initialized.  The pmenu structure for this 
  644.           popup is as follows: 
  645.  
  646.           static struct pmenu intelc = {
  647.             0, FALSE, 0,                     /* wpsave, winopn, lndx */
  648.              2, 6, {                         /* fm, lm */
  649.              1, 2, "         Intellicom", 0,            /** ----- **/
  650.              2, 2, "        Quick - Help", 0,           /*    |    */ 
  651.              4, 5, "1 General Information  ", 1,        /*    |    */
  652.              5, 5, "2 Terminal Mode Options", 2,        /*    |    */
  653.              6, 5, "3 XMODEM File Send     ", 3,        /* 10 menu */
  654.              7, 5, "4 XMODEM File Receive  ", 4,        /*  items  */
  655.              8, 5, "5 CompuServe Exec Mode ", 5,        /*         */
  656.             10, 2, "Press: ESC to quit or Cursor", 0,   /*         */
  657.             11, 2, " Keys to Position Cursor then", 0,  /*         */
  658.             12, 2, " press RETURN for MORE info.", 0,   /** ----- **/
  659.             99, 99, "",99 }                 /* ALWAYS ADD THIS LINE */
  660.           };
  661.           
  662.  
  663.  
  664.  
  665.  
  666.                                                            Page: 10
  667.                                                      The Window BOSS
  668.  
  669.  
  670.  
  671.         Popup Menu Basics - continued.
  672.  
  673.  
  674.  
  675.         The end of the pmenu structure is designated by defining a menu 
  676.         item at row 99, column 99, with null text, with a return code of 
  677.         99.  THIS MUST ALWAYS BE DONE!
  678.  
  679.           Example:
  680.              
  681.              #include "windows.h"
  682.  
  683.              static struct pmenu intelc = {
  684.                0, FALSE, 0,
  685.                2, 6, {
  686.                1, 2, "         Intellicom", 0,
  687.                2, 2, "        Quick - Help", 0,
  688.                4, 5, "1 General Information  ", 1,
  689.                5, 5, "2 Terminal Mode Options", 2,
  690.                6, 5, "3 XMODEM File Send     ", 3,
  691.                7, 5, "4 XMODEM File Receive  ", 4,
  692.                8, 5, "5 CompuServe Exec Mode ", 5,
  693.               10, 2, "Press: ESC to quit or Cursor", 0,
  694.               11, 2, " Keys to Position Cursor then", 0,
  695.               12, 2, " press RETURN for MORE info.", 0,
  696.               99, 99, "",99 }
  697.              };
  698.             
  699.              main()
  700.              {
  701.              WINDOWPTR w1;
  702.              int wat, bat, rv;
  703.  
  704.                wn_init();
  705.                w1 = wn_open(0,11,1,31,2,NORMAL,NORMAL);
  706.                if(!w1) exit(1);
  707.                wat = (WHITE<<4|BLACK);
  708.                bat = (BLUE<<4|WHITE); 
  709.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, FALSE);
  710.                wn_printf(w1, "wn_popup returned: %d\n",rv);
  711.                wn_printf(w1, "Press any key to continue..");
  712.                v_getch();
  713.                wn_close(w1);
  714.                wn_exit();
  715.                exit(0);
  716.              }
  717.              /* End */
  718.  
  719.           To make the popup menu disappear upon return, change the call 
  720.           to wn_popup to be:
  721.  
  722.                rv = wn_popup(0, 0, 0, 33, 14, wat, bat, &intelc, TRUE);
  723.  
  724.  
  725.  
  726.  
  727.                                                            Page: 11
  728.                                                      The Window BOSS
  729.  
  730.  
  731.  
  732.         Popup Menu Basics - continued.
  733.  
  734.  
  735.  
  736.         The calling sequence and setup of wn_qpopup is similar to 
  737.         wn_popup but the functions significantly differ operationally.  
  738.         The parameter list differs in that there is no window close flag 
  739.         parameter.  The operational differences are more significant. 
  740.         wn_qpopup places the popup window on the screen and then 
  741.         immediately returns a WINDOWPTR to the open and active popup 
  742.         window.  The calling function assumes full responsibility for  
  743.         the window from then on (i.e. moving, closing, etc.).
  744.  
  745.         Quick popups are used to display information only and do not 
  746.         contain action menu items.  
  747.  
  748.         Example:
  749.  
  750.              #include "windows.h"
  751.  
  752.              static struct pmenu m1 = {
  753.                0, FALSE, 0,
  754.                0, 0, {
  755.                1, 2, "Presenting", 0,
  756.                99, 99, "",99 }
  757.              };
  758.  
  759.              main()
  760.              {
  761.              int wat, bat;
  762.              WINDOWPTR w2;
  763.  
  764.                wat = (WHITE<<4|BLACK);
  765.                bat = (BLUE<<4|WHITE);
  766.                w2 = wn_qpopup(0,0,0,16,3,wat,bat,&m1);
  767.                v_getch();
  768.                wn_close(w2);
  769.                wn_exit();
  770.                exit();
  771.              }
  772.              /* End */
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.                                                            Page: 12
  789.                                                      The Window BOSS
  790.  
  791.  
  792.  
  793.         Popup Menu Basics - continued.
  794.  
  795.  
  796.  
  797.         4.4.1. Notes
  798.  
  799.         Popup menu items are highlighted by moving the cursor bar with 
  800.         the arrow keys, space bar, or by pressing the first letter/digit 
  801.         of the menu item.  wn_popup will return as soon as the Enter or 
  802.         Escape key is struck.  The return code specified in the pmenu 
  803.         structure is returned when the Enter key is pressed, Escape 
  804.         causes return code of 99 to be passed back to the calling 
  805.         function. 
  806.  
  807.         Menu navigation is from the current to next or current to 
  808.         previous menu item when using the cursor keys or space bar.  Item 
  809.         skipping can only be accomplished by using the "first character" 
  810.         selection method.  Skip selection will only work as anticipated, 
  811.         if the first character of each action menu item is unique.
  812.  
  813.         Source code is provided (WN_HELP.C) to allow you to customize 
  814.         and/or enhance the popup menu system to meet your needs.
  815.  
  816.         The BOSSDEMO program contains coding samples showing the use of 
  817.         wn_popup, wn_qpopup, and how to implement pulldown menus using 
  818.         wn_popup.
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.                                                            Page: 13
  850.                                                      The Window BOSS
  851.  
  852.  
  853.  
  854.         4.5. Help System Basics
  855.  
  856.         The Window BOSS includes a file based help system that can be 
  857.         used to provide your applications with "context sensitive" help.  
  858.  
  859.         It would be helpful for you to print out a few pages of 
  860.         "INTELC.HLP" to refer to during the following discussion.  You 
  861.         should also run the BOSSDEMO program and exercise the Intellicom 
  862.         Quick Help popup menu. This code uses the help system to produce 
  863.         the displays when menu selections are made.
  864.  
  865.         The system uses plain ASCII text files you create with your 
  866.         favorite editor.  A special, but easy to follow, file layout is 
  867.         used.  The file layout we have chosen allows the plain ASCII text 
  868.         files to be indexed using the supplied index generation utility 
  869.         GENINDEX.  The indexing provides the system with the ability to 
  870.         rapidly locate and display help messages when called upon to do 
  871.         so.  Since the source (WN_HELP.C & GENINDEX.C) to the entire help 
  872.         system is provided, you can modify it to meet your own needs.  
  873.  
  874.         In order to use the help system in your application you must take 
  875.         two preparatory steps: (1) prepare the ASCII text file in the 
  876.         specified format and (2) run the GENINDEX program.  For example, 
  877.         you first create a text file called "TAXES.HLP" using Brief, 
  878.         Vedit, Edlin, or your favorite word processor in non_document 
  879.         (ASCII) mode and then run the GENINDEX program by:
  880.  
  881.                             C> GENINDEX TAXES.HLP
  882.  
  883.         The GENINDEX program reads "TAXES.HLP" and produces "TAXES.NDX".  
  884.         Both "TAXES.HLP" and "TAXES.NDX" must be available to the 
  885.         application program at run time.
  886.  
  887.         To actually use the help system in your application you must 
  888.         first initialize the help system by calling wn_hlinit.  This 
  889.         must be done before any attempt is made to display help messages.
  890.         The help system must only be initialized once.  The call to 
  891.         initialize the help system is of the form:
  892.  
  893.              .....                              /* code */
  894.           rv = wn_hlinit(row, col, width, height, atrib, batrib, file)
  895.              .....                              /* code */
  896.  
  897.         The parameters define the location, size, and attributes of the 
  898.         window in which the help messages will be displayed along with 
  899.         the name of the help file to be used.  wn_hlinit returns TRUE if 
  900.         all is well, FALSE otherwise.
  901.  
  902.         Initialization does not cause a window to be displayed, it merely 
  903.         sets the system up for later use by opening and reading the index 
  904.         file into memory.
  905.  
  906.  
  907.  
  908.  
  909.  
  910.                                                            Page: 14
  911.                                                      The Window BOSS
  912.  
  913.  
  914.  
  915.         Help System Basics - continued.
  916.  
  917.  
  918.  
  919.         To initialize the system for full screen help messages in a 
  920.         window with white letters on blue background and a similar border 
  921.         using the file "INTELC.HLP", the call to wn_hlinit would be:
  922.  
  923.          wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  924.  
  925.         The help system is now initialized to display full screen help 
  926.         messages using "INTELC.HLP" and "INTELC.NDX" as the help message 
  927.         database. (The BOSSDEMO program uses the above code.)
  928.  
  929.         Important - Unless you intend to modify the help system, the 
  930.         above call to wn_hlinit should always be used - modified only to 
  931.         reflect the name of your help file. 
  932.  
  933.         Obtaining help at run time is accomplished by calling the wn_help 
  934.         function with a subject key word.  For example:
  935.  
  936.              rv = wn_help("%general information%");
  937.  
  938.         Subject key words are located in the ASCII help file you prepare 
  939.         and are processed by the GENINDEX program.  The usage of 
  940.         wn_help() should be clear once we complete the discussion of the 
  941.         file layout.
  942.  
  943.         The text file you prepare consists of help system commands, 
  944.         subject key words, and the actual text to be displayed which is 
  945.         formatted to fit inside the window defined by wn_hlinit.  
  946.  
  947.         Commands 
  948.  
  949.           .cp   - signals end of page 
  950.           *END* - signals end of page and end of help for this subject
  951.  
  952.           Text is sequentially displayed a screen at a time from the 
  953.           subject keyword through any number of .cp delimited screens 
  954.           through and including the screen delimited by *END*.  The 
  955.           system allows for forward and reverse display via the PgDn and 
  956.           PgUp keys.  The .cp signals the end of a single screen in a 
  957.           series of 2 or more screens.  When .cp is detected the message  
  958.           "Esc to quit help, PgUp for previous screen, any other key to 
  959.           continue..." will be displayed.  When *END* is detected, the 
  960.           message "End of help, PgUp for previous screen, any other key 
  961.           to continue..." is displayed.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.                                                            Page: 15
  972.                                                      The Window BOSS
  973.  
  974.  
  975.  
  976.         Help System Basics - continued.
  977.  
  978.  
  979.  
  980.         Keywords:
  981.  
  982.           Keywords are always enclosed within percent signs (%) and 
  983.           signal the beginning of text on a particular subject.  They are 
  984.           used by the GENINDEX program to create the index (NDX) file and 
  985.           are used by you as parameters to the wn_help() function.
  986.  
  987.           In the case of "INTELC.HLP" you will find the following 
  988.           keywords:
  989.  
  990.           %ksend%, %ksend1%, %krecv%, %krecv1%, %checksum xmit1%, 
  991.           %checksum recv1%, %terminal/c1%, %cistty1%, %terminal%, 
  992.           %terminal/c%, %cistty%, %status%, %dos window%, %exit to dos%,
  993.           %close capture%, %autodial%, %ascii xmit%, %checksum xmit%,
  994.           %checksum recv%, %general information%, %bossinfo%, 
  995.           %end-of-file%
  996.  
  997.         Text:
  998.              
  999.           Each screen of text is delimited by either a keyword, the .cp 
  1000.           command, or the *END* command.  Text is always formatted to fit 
  1001.           inside the help window.  In the case of "INTELC.HLP" there are 
  1002.           two leading spaces and the text is right justified to end at 
  1003.           column 76.  The two leading and trailing spaces center the text 
  1004.           between the borders.  Blank lines at the top of each screen 
  1005.           (page full) can be used to vertically center the text.  Spaces 
  1006.           on the left can be used to horizontally center text.
  1007.  
  1008.           Important - Unless you intend to modify the help system, the 
  1009.           format defined by "INTELC.HLP" should always be followed for 
  1010.           any help files you create for your own use.
  1011.  
  1012.         4.5.1. Notes
  1013.  
  1014.           The help system is configured to provide a full screen text 
  1015.           message, subject keys are limited to 25 characters, and there 
  1016.           is a limit of 255 subject keys per file.  This can be changed 
  1017.           by modifying the functions found in "wn_help.c"  THERE IS A 
  1018.           DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO INITIALIZE 
  1019.           THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT FILE READ BY 
  1020.           THE GENINDEX PROGRAM.  If you modify the code be sure to also 
  1021.           modify location and text of the messages to be displayed when 
  1022.           .cp and/or *END* are detected.
  1023.          
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.                                                            Page: 16
  1033.                                                      The Window BOSS
  1034.  
  1035.  
  1036.  
  1037.         Help System Basics - continued.
  1038.  
  1039.  
  1040.  
  1041.           The GENINDEX program is provided in source form.  An EXEcutable 
  1042.           will have to be created locally.  You may also have to adjust 
  1043.           the logic to account for the way the various compilers treat 
  1044.           <CR><LF> sequences.  This usually amounts to nothing more than 
  1045.           changing the "rb" to "r" in the fopen statement.  The best way 
  1046.           to determine if you have built a properly functioning GENINDEX 
  1047.           program is to run your newly created GENINDEX program against 
  1048.           "INTELC.HLP" to create a new "INTELC.NDX".  Then rebuild the 
  1049.           BOSSDEMO program and test to see if the Intellicom Quick Help 
  1050.           popup is functioning properly.  If it is, you are all set.  If 
  1051.           you receive a "Sorry - No info on... " message, then you will 
  1052.           need to edit GENINDEX to make the "rb"/"r" change.  
  1053.  
  1054.           This help system has nothing in common with the way in which 
  1055.           the data entry help and error messages get displayed.
  1056.  
  1057.           Help files always have a filename extension of "HLP".  Index 
  1058.           files always have a filename extension of "NDX".
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.                                                            Page: 17
  1094.                                                      The Window BOSS
  1095.  
  1096.  
  1097.  
  1098.         Help System Basics - continued.
  1099.  
  1100.  
  1101.  
  1102.         Here is a sample program that uses INTELC.HLP.
  1103.  
  1104.              #include "windows.h"
  1105.              main()
  1106.              {
  1107.              WINDOWPTR w1;                   /* window handle */
  1108.              int batrib;                     /* border atrib */
  1109.              int watrib;                     /* window atrib */
  1110.  
  1111.                wn_init();
  1112.                batrib = BLUE<<4 | WHITE;
  1113.                watrib = WHITE<<4 | BLACK;
  1114.                w1 = wn_open(0,0,0,25,10,watrib,batrib);
  1115.                if(!w1) exit(1);
  1116.  
  1117.                wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),"intelc");
  1118.  
  1119.                wn_printf(w1, "Press any key\n"); v_getch();
  1120.                wn_help("%ksend%");
  1121.                wn_printf(w1, "Press any key\n"); v_getch();
  1122.                wn_help("%ksend1%");
  1123.                wn_printf(w1, "Press any key\n"); v_getch();
  1124.                wn_help("%krecv%");
  1125.                wn_printf(w1, "Press any key\n"); v_getch();
  1126.                wn_help("%krecv1%");
  1127.                wn_printf(w1, "Press any key\n"); v_getch();
  1128.                wn_help("%checksum xmit1%");
  1129.  
  1130.                wn_printf(w1, "Press any key\n"); v_getch();
  1131.                wn_close(w1);
  1132.                wn_exit();
  1133.                exit(0);
  1134.              }
  1135.  
  1136.              /* End */
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.                                                            Page: 18
  1155.                                                      The Window BOSS
  1156.  
  1157.  
  1158.  
  1159.         4.6. Mouse Basics
  1160.  
  1161.         The Window BOSS includes a collection of routines that provide 
  1162.         the building blocks for developing applications that incorporate 
  1163.         Mouse support.  As a programmer you will need following:
  1164.  
  1165.              . The mouse and its associated hardware
  1166.  
  1167.              . The mouse driver software
  1168.  
  1169.              . C and/or Assembly level functions to communicate with the 
  1170.                mouse
  1171.  
  1172.         The first two are provided by the mouse manufacturer and must be 
  1173.         installed as outlined in the manufacturer's literature.  The last 
  1174.         item is provided as part of The Window BOSS. The Window BOSS's 
  1175.         mouse functions adhere to the de facto Microsoft standard. 
  1176.         However, all of the routines have been extensively tested with 
  1177.         both Microsoft and Logitech mice.
  1178.  
  1179.         Mouse Communication
  1180.  
  1181.         The only practical method of communicating with the mouse is 
  1182.         through the mouse device driver, which is accessible via software 
  1183.         interrupt 33H.  This interrupt is not used by DOS and is claimed 
  1184.         by the mouse device driver at its invocation.  Information is 
  1185.         exchanged between the mouse device driver and calling software 
  1186.         via the standard 8086/88 registers. As a Window BOSS user you 
  1187.         will be pleased to know that the burden of having to deal with 
  1188.         the mouse at this level has be replaced by a collection of "C" 
  1189.         level routines that handle all of the aforementioned setup, 
  1190.         software interrupts and register loading/unloading!!
  1191.  
  1192.         Mouse Usage
  1193.  
  1194.         Once the mouse has been initialized (reset), you can show it, 
  1195.         hide it, move it, ask it where it is, check to see if its buttons 
  1196.         have been pressed or released, make it emulate a light pen, put a 
  1197.         cage around it (set its region), define its shape and associated 
  1198.         attribute, or ask it how many buttons it has!
  1199.  
  1200.         Mouse Functions
  1201.  
  1202.         The standard Microsoft mouse supports 16 functions. Logitech's 
  1203.         are the same, although some are tweaked a tad to handle the 3rd 
  1204.         button.  The Window BOSS provides an easy to use interface to the 
  1205.         low level mouse functions and several higher level functions to 
  1206.         ease your applications level programming.
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.                                                            Page: 19
  1216.                                                      The Window BOSS
  1217.  
  1218.  
  1219.  
  1220.         Mouse Basics - continued.
  1221.  
  1222.  
  1223.  
  1224.         Mouse Functions - continued.
  1225.  
  1226.         The following table summarizes the 16 Microsoft Mouse Functions:
  1227.  
  1228.              Function       Description              Window BOSS Function
  1229.                 0           Initialize mouse         mo_reset()
  1230.                 1           Show mouse               mo_show()
  1231.                 2           Hide mouse cursor        mo_hide()
  1232.                 3           Get position & status    mo_pos()
  1233.                 4           Set mouse position       mo_move()
  1234.                 5           Get button press info    mo_pbinfo()
  1235.                 6           Get button release info  mo_rbinfo()
  1236.                 7           Set min/max columns      mo_clim()
  1237.                 8           Set min/max rows         mo_rlim()
  1238.                 9 *         Define graphics pointer  mo_sgcursor()
  1239.                10           Define text pointer      mo_scursor()
  1240.                11           Read motion counters     mo_motion()
  1241.                12 *         Define event handler     mo_task()
  1242.                13           Light pen emulation on   mo_lpon()
  1243.                14           Light pen emulation off  mo_lpoff()
  1244.                15 *         Set motion pixel ratio   mo_ratio()
  1245.  
  1246.         In addition to the above low level interface routines, the 
  1247.         following application's level functions have been implemented to 
  1248.         ease the mouse's natural display adapter sensitivity.  Without 
  1249.         these routines, mouse applications would have to deal with the 
  1250.         mouse in a 640x200-pixel plane - even in text mode!
  1251.  
  1252.              mo_rcpos()     Return current mouse position (row, col)
  1253.              mo_locate()    Locate mouse (row, col)
  1254.              mo_press()     Get button pressed info (button, location..)
  1255.              mo_release()   Get button released info ( " " " " " " " " )
  1256.              mo_region()    Set mouse hot area (row, col, width, height)
  1257.              mo_setptr()    Set mouse pointer (style, attributes)
  1258.              mo_wait()      Wait for mouse to settle (de bouncing logic)
  1259.              mo_nbut()      Return # of buttons on mouse
  1260.  
  1261.         Most mouse applications will use and generally only need to use: 
  1262.         mo_reset(), mo_show(), mo_hide(), and most or all of the 
  1263.         application level functions.  
  1264.  
  1265.         The low level functions are provided for those who prefer to deal 
  1266.         with the mouse on its 640 x 200 pixel plane.
  1267.  
  1268.         All of the above supported functions are documented in the 
  1269.         FUNCTION CALL SYNOPSIS section of this manual.
  1270.  
  1271.         * Interfaces to these functions are provided, but are not 
  1272.         supported, by Star Guidance. 
  1273.  
  1274.  
  1275.  
  1276.                                                            Page: 20
  1277.                                                      The Window BOSS
  1278.  
  1279.  
  1280.  
  1281.         Mouse Basics - continued.
  1282.  
  1283.  
  1284.  
  1285.         Mouse Programming Example (Basic)
  1286.  
  1287.         #include "windows.h"                    /* ALWAYS */
  1288.  
  1289.         main()
  1290.         {
  1291.         MOUSEPTR m1;                            /* my mouse ptr */
  1292.         int mstat, mclik, mrow, mcol;           /* mouse stuff */
  1293.         int i;                                  /* scratch */
  1294.  
  1295.           v_cls(NORMAL);                        /* clear the screen */
  1296.           v_locate(0,0,0);                      /* locate the cursor */
  1297.  
  1298.           m1 = mo_reset();                      /* init mouse */
  1299.  
  1300.           if(m1) {                              /* mouse exists */
  1301.             printf("Mouse exists with %d buttons.\n", mo_nbutt(m1));
  1302.             mo_setptr(m1, 0x1E, NORMAL);        /* set mouse pointer style */
  1303.             mo_reigon(m1, 0, 0, 80, 25);        /* set mouse "window" */
  1304.             mo_show(m1);                        /* show the critter */
  1305.  
  1306.             v_locate(0,5,0);
  1307.             printf("Roll test... move mouse, click left or right to end.\n");
  1308.             do {                                /* rolling test */
  1309.               mo_rcpos(m1, &mstat, &mrow, &mcol);
  1310.               v_locate(0,6,0);
  1311.               printf("Mouse @ %03d,%03d", mrow, mcol);
  1312.             } while (!mstat);
  1313.  
  1314.             v_cls(NORMAL);                      /* clear screen */
  1315.             v_locate(0,0,0);                    /* home cursor */
  1316.             mo_hide(m1);                        /* hide mouse */
  1317.             m1 = mo_reset();                    /* reset mouse */
  1318.             exit(0);                            /* finito */
  1319.           }
  1320.           else {
  1321.             printf("NO MICE HERE!!\n");         /* tell of woe... */
  1322.             exit(0);                            /* exit */
  1323.           }
  1324.         }
  1325.  
  1326.         /* End */
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.                                                            Page: 21
  1338.                                                      The Window BOSS
  1339.  
  1340.  
  1341.  
  1342.         4.7. Important Concepts
  1343.  
  1344.         The preceding programming examples serve as the foundation for 
  1345.         some fundamental, but very important, concepts.  
  1346.  
  1347.         4.7.1. WINDOWS.H
  1348.  
  1349.         The Window BOSS requires the file "windows.h" to be included in 
  1350.         any source code files that are going to reference any of the 
  1351.         windowing, data entry, or form control functions.  Take the time 
  1352.         to peruse this file as it contains all of the constants and 
  1353.         structures used by both The Window BOSS and Data Clerk.  
  1354.         Also, please note that WINDOWS.H includes other standard compiler 
  1355.         header files.
  1356.  
  1357.         4.7.2. Window Handles
  1358.  
  1359.         All windowing functions (any function beginning with "wn_") 
  1360.         either explicitly require an associated window pointer to work, 
  1361.         or assume one already is, or will be, created.  
  1362.  
  1363.         4.7.3. Mouse Handles
  1364.  
  1365.         All mouse functions (any function beginning with "mo_") 
  1366.         either explicitly require an associated mouse pointer to work, 
  1367.         or assume one already is, or will be, created.  
  1368.  
  1369.         4.7.4. Window Origin
  1370.  
  1371.         Windows have an origin relative to the upper left hand corner of 
  1372.         the screen which is row 0, and column 0.
  1373.  
  1374.         4.7.5. Text and Data Field Origins
  1375.  
  1376.         Text and data fields have an origin relative to the upper left 
  1377.         hand corner of the window, which is always row 0, column 0.
  1378.  
  1379.         4.7.6. Attributes
  1380.  
  1381.         Attributes (foreground/background colors) must be specified for 
  1382.         windows, borders, and data entry fields.  Prompts for data entry 
  1383.         fields always have the same attributes as the window. The fields 
  1384.         themselves can have, but do not require, a different attribute 
  1385.         set.
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.                                                            Page: 22
  1399.                                                      The Window BOSS
  1400.  
  1401.  
  1402.  
  1403.         4.7.7. Fields and Forms
  1404.  
  1405.         Fields are defined by calling the field definition functions 
  1406.         (wn_gdate, wn_gtime, wn_gphone, ...) with "SET" as the function 
  1407.         code (1st arg), a valid form handle (2nd arg), a field sequence 
  1408.         number (3rd arg), and the window handle (4th arg) belonging to 
  1409.         the window in which the form is to be displayed.  The same 
  1410.         functions that are used to retrieve discrete information can be 
  1411.         combined to create a form when used in conjunction with 
  1412.         wn_frmopn() and wn_frmget().  Note the use of XEQ vs. SET, NFRM 
  1413.         vs. f1, and NFLD in the preceding two program examples.  XEQ 
  1414.         stands for "execute now", while SET stands for "set up for later 
  1415.         execution under wn_frmget()".
  1416.  
  1417.         Forms are anchored to a particular window and must be created by 
  1418.         wn_frmopn() and defined with field definition functions.
  1419.  
  1420.         Data entry fields can be edited, pre-filled, have validation 
  1421.         ranges, and have both help and error messages associated with 
  1422.         them.  
  1423.  
  1424.         4.7.8. Return Values
  1425.  
  1426.         Some functions return an indication of success or failure which 
  1427.         you can foolishly ignore, or check to determine what action to 
  1428.         take.
  1429.  
  1430.         4.7.9. Closing Forms and Windows
  1431.  
  1432.         Both forms and windows should be closed when they are no longer 
  1433.         needed.  Although you can close them in any order, it makes sense 
  1434.         to close all forms associated with a window before closing the 
  1435.         window itself.  As a side note - attempting to reference either 
  1436.         forms or windows which have been closed can lead to unpredictable 
  1437.         results.
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                                                            Page: 23
  1460.                                                      The Window BOSS
  1461.  
  1462.  
  1463.  
  1464.         Important Concepts - continued.
  1465.  
  1466.  
  1467.  
  1468.         4.7.10. Overlapping Windows
  1469.  
  1470.         The Window BOSS fully supports the concept of overlapping 
  1471.         windows, that is to say that you can have several windows on the 
  1472.         screen at the same time and freely access any one of them without 
  1473.         having to be concerned with the order in which they were opened 
  1474.         or whether or not any other windows overlap the one you wish to 
  1475.         access.  The Window BOSS employs the "most recently used is 
  1476.         active" concept.  This concept is based on the following:
  1477.  
  1478.              . The last window referenced is the current active 
  1479.                window.  
  1480.  
  1481.              . The current active window is always the top window.
  1482.  
  1483.         For example, let us assume that you have opened three overlapping 
  1484.         windows in the following order; w1, w2, w3. w3 is considered to 
  1485.         be the top window because it was the last window referenced. If 
  1486.         you now reference, or explicitly activate w2, The Window BOSS 
  1487.         will automatically adjust the screen image to insure that w2 is 
  1488.         now the top window with w3 and w1 being partially hidden by w2.
  1489.  
  1490.                   Before                   After
  1491.  
  1492.                   +----------+             +----------+
  1493.                   |  W1      |             | W1       |
  1494.                   |  +----------+          |  +----------+
  1495.                   |  | W2       |          |  | W2       |
  1496.                   |  |  +------------+     |  |          |----+
  1497.                   |  |  | W3         |     |  |          | W3 |
  1498.                   |  |  |            |     |  |          |    |
  1499.                   |  |  +------------+     |  |          |----+
  1500.                   |  |          |          |  |          |
  1501.                   |  +----------+          |  +----------+
  1502.                   |          |             |          |
  1503.                   +----------+             +----------+
  1504.  
  1505.         It is extremely important to keep in mind that The Window BOSS 
  1506.         will automatically activate (bring to the top) the window being 
  1507.         referenced.  By keeping your screen layouts attractive and 
  1508.         uncluttered there will be a minimum of window thrashing which is 
  1509.         both annoying and time consuming.
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.                                                            Page: 24
  1521.                                                      The Window BOSS
  1522.  
  1523.  
  1524.  
  1525.         Important Concepts - continued.
  1526.  
  1527.  
  1528.  
  1529.         4.7.11. Functions
  1530.  
  1531.         The Window BOSS's functions fall into four major groups: those 
  1532.         that manipulate windows, those that deal with data entry, those 
  1533.         that deal with the mouse, and those that deal with the video or 
  1534.         keyboard interface at a relatively low level.  All window and 
  1535.         data manipulation functions begin with the prefix "wn_" as in 
  1536.         "wn_open".  All mouse functions begin with "mo_" as in 
  1537.         "mo_reset", while all video and keyboard based functions begin 
  1538.         with "v_" or "_" as in "v_getch" and "_putch".  This convention 
  1539.         makes it easy to remember where to look when you want to do 
  1540.         something.  Additionally, there are several global functions 
  1541.         which begin with "wns_".  These functions, although visible to 
  1542.         the outside world, are used internally by The Window BOSS. 
  1543.  
  1544.         So ends the tale of the basics, you are now ready to add sizzle, 
  1545.         bright lights, and artistic touches to all your applications!  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                                                            Page: 25
  1582.                                                      The Window BOSS
  1583.  
  1584.  
  1585.  
  1586.         5. Distribution Methods & Media Kits 
  1587.  
  1588.         The Window BOSS is distributed on 5 1/4" DSDD diskettes.  There 
  1589.         are two media kits available: The Shareware diskette kit and The 
  1590.         Source diskette kit.  This doucument describes both media kits.  
  1591.         Neither media kit contains ALL of the files listed.
  1592.  
  1593.         The Shareware diskettes can be freely copied and shared.  The 
  1594.         Source diskettes cannot. In either case, you receive a bundled 
  1595.         product -- that is to say, we do not require you to order a 
  1596.         separate media kit for Microsoft, another for Borland, and so on.  
  1597.         All our products include support for all the compilers we 
  1598.         support. This makes moving from one compiler to another child's 
  1599.         play, and it also helps to protect your software development 
  1600.         investment, while at the same time saving you a significant sum 
  1601.         of money!
  1602.  
  1603.         5.1. CompuServe, GENIE, BIX, & Bulletin Board Files
  1604.  
  1605.         We always upload the latest release of shareware files to GENIE, 
  1606.         CompuServe, BIX, and selected BBS(s) around the country.  These 
  1607.         files can be found in the Vendor Support Software Library on the 
  1608.         IBM Round Table (M 616) of GENIE, in the "C" Language Section on 
  1609.         the IBM Programming Sig (GO IBMPRO) of CompuServe, and in the 
  1610.         "C.LANGUAGE" section of the "ibm.listings" on BIX. In all cases 
  1611.         we try to name the required files as BOSS01.LZH (code++), 
  1612.         BOSS2A.LZH & BOSS2B.LZH (libs), BOSS03.LZH (documentation).  
  1613.         Naturally, this naming convention is subject to the approval of 
  1614.         the respective service provider.  However, it is reasonable to 
  1615.         assume that the required files will always conform to a naming 
  1616.         convention that begins with "BOSS" or "BOS" and have the keyword 
  1617.         "windows" associated with them.  
  1618.  
  1619.         If you can not find The Window BOSS files on GENIE, BIX, or 
  1620.         CompuServe it may be due to a restructuring of the SIGs by the 
  1621.         respective service provider.  Try looking in the vendor support, 
  1622.         systems, or language areas of the SIGS.
  1623.  
  1624.         Bulletin Board files follow the same naming conventions as GENIE 
  1625.         and CompuServe files.  
  1626.  
  1627.         5.2. The SHAREWARE Distribution Diskette(s)
  1628.  
  1629.           The SHAREWARE diskette(s) contain the following files:
  1630.  
  1631.            Shareware Disk 1
  1632.  
  1633.              LHARC.EXE           <- Archive utility
  1634.              LHAR_DOC.LZH        <- Archive utility document archive
  1635.              BOSS_DOC.LZH        <- Window BOSS Documentation archive
  1636.              BOSS_SUP.LZH        <- Support archive (code, etc.)
  1637.              BOSS_LB2.LZH        <- Library archive (Watcom, Zortech)
  1638.              READ.ME             <- Important notes
  1639.  
  1640.  
  1641.  
  1642.                                                            Page: 26
  1643.                                                      The Window BOSS
  1644.  
  1645.  
  1646.  
  1647.         The Shareware Distribution Diskette - continued.
  1648.  
  1649.  
  1650.            Shareware Disk 2
  1651.  
  1652.              BOSS_LB1.LZH        <- Library archive (Microsoft)
  1653.              BOSS_LB3.LZH        <- Library archive (Mix, Aztec, C86)
  1654.              BOSS_LB4.LZH        <- Library archive (Datalight, Lattice,
  1655.                                                      Borland Turbo C)
  1656.  
  1657.              Contents of BOSS_DOC
  1658.  
  1659.                BOSS.MAN          <- This manual
  1660.                BOSS.TOC          <- Table of Contents
  1661.  
  1662.              Contents of BOSS_SUP
  1663.  
  1664.                AZCS.BAT          <- Compiler Driver - Aztec
  1665.                C86.BAT           <- Compiler Driver - CI86
  1666.                DLCS.BAT          <- Compiler Driver - Datalight
  1667.                LCS3.BAT          <- Compiler Driver - Lattice 3.4
  1668.                LCS6.BAT          <- Compiler Driver - Lattice 6.0
  1669.                MSC5.BAT          <- Compiler Driver - Microsoft C 5.X
  1670.                MSC6.BAT          <- Compiler Driver - Microsoft C 6.X
  1671.                MSQC20.BAT        <- Compiler Driver - Quick C 2.0
  1672.                MSQC25.BAT        <- Compiler Driver - Quick C 2.5
  1673.                PCCM.BAT          <- Compiler Driver - Mix Power C
  1674.                TCS.BAT           <- Compiler Driver - Turbo C
  1675.                WECS.BAT          <- Compiler Driver - EXPRESS C
  1676.                WOCS.BAT          <- Compiler Driver - Watcom C
  1677.                ZTCS.BAT          <- Compiler Driver - Zortech C
  1678.                LOADAZ.BAT        <- Link Batch file - Aztec
  1679.                LOADC86.BAT       <- Link Batch file - CI86
  1680.                LOADDLC.BAT       <- Link Batch file - Datalight
  1681.                LOADLC3.BAT       <- Link Batch file - Lattice 3.4
  1682.                LOADLC6.BAT       <- Link Batch file - Lattice 6.0
  1683.                LOADMS5.BAT       <- Link Batch file - Microsoft C 5.X
  1684.                LOADMS6.BAT       <- Link Batch file - Microsoft C 6.X
  1685.                LOADQC20.BAT      <- Link Batch file - Quick C 2.0
  1686.                LOADQC25.BAT      <- Link Batch file - Quick C 2.5
  1687.                LOADPC.BAT        <- Link Batch file - Mix Power C
  1688.                LOADTC.BAT        <- Link Batch file - Turbo C
  1689.                LOADWAT.BAT       <- Link Batch file - Watcom C
  1690.                LOADWEC.BAT       <- Link Batch file - EXPRESS C
  1691.                LOADZTC.BAT       <- Link Batch file - Zortech C
  1692.                BOSSDEMO.C        <- Source to BOSSDEMO
  1693.                BOSSDEMO.EXE      <- DEMO Program
  1694.                GENINDEX.C        <- Source to GENINDEX
  1695.                HELLO.C           <- The Classic...
  1696.                INTELC.HLP        <- Demo DATA file
  1697.                INTELC.NDX        <- Index for Demo DATA file
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.                                                            Page: 27
  1704.                                                      The Window BOSS
  1705.  
  1706.  
  1707.  
  1708.         The Shareware Distribution Diskette - continued.
  1709.  
  1710.  
  1711.              Contents of BOSS_SUP - continued.
  1712.  
  1713.                REV.HST           <- Revision History
  1714.                REV.LEV           <- Revision Level
  1715.                SAMPLE.C          <- Data entry sample program
  1716.                WINDOWS.FN5       <- Type Checking INCLUDE file
  1717.                WINDOWS.FN6       <- Type Checking INCLUDE file 
  1718.                WINDOWS.FNZ       <- Type Checking INCLUDE file
  1719.                WINDOWS.EXT       <- External Definition INCLUDE file
  1720.                WINDOWS.H         <- BOSS INCLUDE file
  1721.                WN_FRMGE.C        <- Data Entry form reader
  1722.                WN_GDATE.C        <- Data Entry function (dates)
  1723.                WN_GFLOA.C        <- Data Entry function (floats)
  1724.                WN_GPHON.C        <- Data Entry function (phone)
  1725.                WN_GTIME.C        <- Data Entry function (time)
  1726.                WN_GULON.C        <- Data Entry function (unsigned long)
  1727.                WN_GBOOL.C        <- Data Entry function (logical)
  1728.                WN_GDOUB.C        <- Data Entry function (double)
  1729.                WN_GINT.C         <- Data Entry function (integer)
  1730.                WN_GLONG.C        <- Data Entry function (long)
  1731.                WN_GPWOR.C        <- Data Entry function (password)
  1732.                WN_GTEXT.C        <- Data Entry function (various text)
  1733.                WN_GUINT.C        <- Data Entry function (unsigned int)
  1734.                WN_IEMSG.C        <- Data Entry error message handler
  1735.                WN_IHMSG.C        <- Data Entry help message hander
  1736.                WN_HELP.C         <- Help function source
  1737.                WN_POPUP.C        <- Popup function source
  1738.                WN_PUTS.C         <- Source to wn_puts()
  1739.  
  1740.              Contents of BOSS_LB1
  1741.  
  1742.                SMSC5.LIB         <- BOSS library - Microsoft C 5.X
  1743.                SMSC6.LIB         <- BOSS library - Microsoft C 6.X
  1744.                SMSQC20.LIB       <- BOSS library - QuickC 2.0 (QCL)
  1745.                SMSQC25.LIB       <- BOSS library - QuickC 2.5 (QCL)
  1746.  
  1747.              Contents of BOSS_LB2
  1748.  
  1749.                WATEC.LIB         <- BOSS library - EXPRESS C
  1750.                WATOC.LIB         <- BOSS library - Watcom C
  1751.                ZTECH.LIB         <- BOSS library - Zortech C
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.                                                            Page: 28
  1765.                                                      The Window BOSS
  1766.  
  1767.  
  1768.  
  1769.         The Shareware Distribution Diskette - continued.
  1770.  
  1771.  
  1772.              Contents of BOSS_LB3
  1773.  
  1774.                MWIN.MIX          <- BOSS library - Mix Power C
  1775.                SAZTEC.LIB        <- BOSS library - Aztec C
  1776.                SC86.LIB          <- BOSS library - CI86
  1777.  
  1778.              Contents of BOSS_LB4
  1779.  
  1780.                SDLC.LIB          <- BOSS library - Datalight
  1781.                SLAT3.LIB         <- BOSS library - Lattice C 3.4
  1782.                SLAT6.LIB         <- BOSS library - Lattice C 6.0
  1783.                STC.LIB           <- BOSS library - Turbo C
  1784.  
  1785.              Contents of LHAR_DOC.LZH
  1786.  
  1787.                LHARC.DOC         <- Archive utility documentation             
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.                                                            Page: 29
  1826.                                                      The Window BOSS
  1827.  
  1828.  
  1829.  
  1830.         5.3. The SOURCE Distribution Diskette(s)
  1831.  
  1832.          The SOURCE diskette(s) contain the following files:
  1833.  
  1834.           DEMO / DOC Disk
  1835.  
  1836.              LHARC.DOC           <- Documentation for ARC.EXE
  1837.              LHARC.EXE           <- Archive utility
  1838.              DOC.LZH             <- Manual 
  1839.              DEMO.LZH            <- DEMO program & data files 
  1840.              READ.ME             <- Important notes
  1841.              REVHST.LZH          <- Revision History 
  1842.              REV.LEV             <- Revision Level 
  1843.              DISKS.LST           <- List of files on source disks
  1844.                   
  1845.           Disk 1
  1846.  
  1847.              CFILES.LZH          <- Source to all "C" modules
  1848.              WATCOM.LZH          <- Watcom Specific files
  1849.              DLC.LZH             <- Datalight Specific files
  1850.  
  1851.           Disk 2
  1852.  
  1853.              MS5.LZH             <- Microsoft C 5.X Specific files
  1854.              MS6.LZH             <- Microsoft C 6.X Specific files
  1855.              MSQC20.LZH          <- Microsoft Quick C 2.0 Specific files
  1856.              MSQC25.LZH          <- Microsoft Quick C 2.5 Specific files
  1857.              TC2.LZH             <- Turbo C Specific files
  1858.              MIX.LZH             <- Mix Power C Specific files
  1859.              ZTC.LZH             <- Zortech C Specific files
  1860.  
  1861.           Disk 3
  1862.  
  1863.              ASMFILES.LZH        <- Source to all "Assembler" modules
  1864.              LC3.LZH             <- Lattice 3.4 Specific files
  1865.              LC6.LZH             <- Lattice 6.0 Specific files
  1866.              C86.LZH             <- CI86 Specific files
  1867.              AZTEC.LZH           <- Aztec Specific files
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.                                                            Page: 30
  1887.                                                      The Window BOSS
  1888.  
  1889.  
  1890.  
  1891.         The SOURCE Distribution Diskette(s) - continued
  1892.  
  1893.  
  1894.  
  1895.              Contents of ASMFILES.LZH (ASM Source Files)
  1896.  
  1897.                AZVLIB.ASM        <- ASM routines for Aztec
  1898.                DLVLIB.ASM        <- ASM routines for Datalight
  1899.                MSVLIB.ASM        <- ASM routines for MSC, Borland, Watcom
  1900.                VLIB.ASM          <- ASM routines for Lattice & CI86
  1901.                PCVLIB.ASM        <- ASM routines for Mix Power C
  1902.                                     Microsoft MASM format
  1903.                WCVLIB.ASM        <- ASM routines for WATCOM C
  1904.  
  1905.              Contents of AZTEC.LZH
  1906.  
  1907.                ACOMPACT.BAT      <- Compact model assembler driver
  1908.                ALARGE.BAT        <- Large model assembler driver
  1909.                AMEDIUM.BAT       <- Medium model assembler driver
  1910.                ASMALL.BAT        <- Small model assembler driver
  1911.                CCC.BAT           <- Compact model compiler driver
  1912.                CCL.BAT           <- Large model compiler driver
  1913.                CCM.BAT           <- Medium model compiler driver
  1914.                CCS.BAT           <- Small model compiler driver
  1915.                CCOMPILE.BAT      <- Compact model - compile *.c
  1916.                LCOMPILE.BAT      <- Large model   - compile *.c
  1917.                MCOMPILE.BAT      <- Medium model  - compile *.c
  1918.                SCOMPILE.BAT      <- Small model   - compile *.c
  1919.                LOADAZ.BAT        <- Link driver for BOSSDEMO
  1920.                MAKELIB.BAT       <- Build LIB from O(s)
  1921.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  1922.                SWIN.LIB          <- Small model library
  1923.                LWIN.LIB          <- Large model library
  1924.                WINDOWS.FNS       <- Type checking header file
  1925.                ?AZVLIB.O         <- Memory model specific object files
  1926.  
  1927.              Contents of C86.LZH (Computer Innovations Specific Files)
  1928.  
  1929.                ASMALL.BAT        <- Small model assembler driver
  1930.                ALARGE.BAT        <- Large model assembler driver
  1931.                CC.BAT            <- Small model compiler driver 
  1932.                CCBIG.BAT         <- Large model compiler driver 
  1933.                EPILOGUE.H        <- ASM include file
  1934.                LCOMPILE.BAT      <- Large model - compile *.c
  1935.                LOADC86.BAT       <- Link driver for BOSSDEMO
  1936.                LWIN.LIB          <- Large model library
  1937.                MAKELIB.BAT       <- Builds LIB file from OBJ(s)
  1938.                MODEL.H           <- ASM include file
  1939.                PROLOGUE.H        <- ASM include file
  1940.                SCOMPILE.BAT      <- Small model - compile *.c
  1941.                SWIN.LIB          <- Small model library
  1942.                ?VLIB.OBJ         <- Memory model specific object files
  1943.  
  1944.  
  1945.  
  1946.  
  1947.                                                            Page: 31
  1948.                                                      The Window BOSS
  1949.  
  1950.  
  1951.  
  1952.         The SOURCE Distribution Diskette - continued.
  1953.              
  1954.  
  1955.  
  1956.              Contents of CFILES.LZH (C Source Files)
  1957.  
  1958.                BOSSDEMO.C        <- BOSSDEMO Source
  1959.                DOSINT.C          <- AZTEC compatibility module.
  1960.                GENINDEX.C        <- GENINDEX Source
  1961.                HELLO.C           <- The classic...
  1962.                SCANCODE.C        <- Quickie to display KB scancodes
  1963.                SAMPLE.C          <- Data entry sample program
  1964.                WINDOWS.C         <- Globals 
  1965.                WINDOWS.H         <- Window BOSS INCLUDE file
  1966.                WINDOWS.EXT       <- Window BOSS INCLUDE file 
  1967.                WN_ACTIV.C        <- Window activation, memory mgmt ++
  1968.                WN_BIOS.C         <- BIOS video functions
  1969.                WN_BOXSE.C        <- Set box drawing character set
  1970.                WN_CLOSE.C        <- Window Close
  1971.                WN_CLR.C          <- Clear window
  1972.                WN_COLOR.C        <- Set window colors
  1973.                WN_DBORD.C        <- Draw window borders
  1974.                WN_DELRO.C        <- Delete row in window
  1975.                WN_DMA.C          <- Set video access mode
  1976.                WN_SCROL.C        <- Set window scrolling method
  1977.                WN_HELP.C         <- Help function source
  1978.                WN_POPUP.C        <- Popup menu source
  1979.                WN_INIT.C         <- Initialize window system
  1980.                WN_DMODE.C        <- Set window display mode
  1981.                WN_FIXCS.C        <- Fix physical cursor location
  1982.                WN_GETS.C         <- Get string with validation   
  1983.                WN_INSRO.C        <- Insert row in window
  1984.                WN_LOCAT.C        <- Locate cursor in window
  1985.                WN_MOVE.C         <- Move window
  1986.                WN_MOUSE.C        <- Mouse interface routines
  1987.                WN_NATRI.C        <- Set new attributes NOW
  1988.                WN_OPEN.C         <- Window open
  1989.                WN_PRINT.C        <- Window printf
  1990.                WN_PUTS.C         <- Put string in window
  1991.                WN_RESTO.C        <- Restore window image
  1992.                WN_SAVE.C         <- Save window image
  1993.                WN_STRING.C       <- String (char) functions
  1994.                WN_SUP.C          <- Internal support functions
  1995.                WN_SYNC.C         <- Set/Clear cursor sync
  1996.                WN_TITLE.C        <- Title window (BASIC)
  1997.                WM_STITLE.C       <- Title window (SUPER)
  1998.                WN_WRAP.C         <- Set/Clear text wrap
  1999.                WPRINTF.C         <- Alternate window printf
  2000.                WINDOWS.FN5       <- Prototype header
  2001.                WINDOWS.FN6       <- Prototype header
  2002.                WINDOWS.FNZ       <- Prototype header
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.                                                            Page: 32
  2009.                                                      The Window BOSS
  2010.  
  2011.  
  2012.  
  2013.         The SOURCE Distribution Diskette - continued.
  2014.              
  2015.  
  2016.  
  2017.              Contents of CFILES.LZH (C Source Files - continued.)
  2018.  
  2019.  
  2020.                WN_GDATE.C        <- Data entry - get date
  2021.                WN_GDOUBLE.C      <- Data entry - get double
  2022.                WN_GTIME.C        <- Data entry - get time
  2023.                WN_GTEXT.C        <- Data entry - get text
  2024.                WN_GPHONE.C       <- Data entry - get phone #
  2025.                WN_GPWORD.C       <- Data entry - get password
  2026.                WN_GINT.C         <- Data entry - get integer
  2027.                WN_GUINT.C        <- Data entry - get unsigned integer
  2028.                WN_GULONG.C       <- Data entry - get unsigned long
  2029.                WN_GLONG.C        <- Data entry - get long
  2030.                WN_GFLOAT.C       <- Data entry - get float 
  2031.                WN_GBOOL.C        <- Data entry - get logical  
  2032.                WN_DTEXT.C        <- Data entry - display text
  2033.                WN_FRMOPN.C       <- Data entry - FORM open
  2034.                WN_FRMGET.C       <- Data entry - FORM read
  2035.                WN_FRMCLS.C       <- Data entry - FORM close
  2036.                WN_INPUT.C        <- Data entry - common input 
  2037.                WN_IEMSG.C        <- Data entry - error msg handler
  2038.                WN_IHMSG.C        <- Data entry - help msg handler
  2039.            
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.                                                            Page: 33
  2070.                                                      The Window BOSS
  2071.  
  2072.  
  2073.  
  2074.         The SOURCE Distribution Diskette - continued.
  2075.              
  2076.  
  2077.  
  2078.              Contents of MIX.LZH (Mix Power C Specific Files)
  2079.  
  2080.           ** Note: Mix Power C only supports the Medium Memory Model **
  2081.  
  2082.                AMEDIUM.BAT       <- Medium model assembler driver
  2083.                MCOMPILE.BAT      <- Medium model - compile *.c
  2084.                LOADPC.BAT        <- Link driver for BOSSDEMO
  2085.                MWIN.MIX          <- Medium model library
  2086.                MAKELIB.BAT       <- Builds MWIN.MIX 
  2087.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2088.                PCCM.BAT          <- Medium model compiler driver
  2089.                WINDOWS.FNS       <- Type checking header
  2090.                PCVLIB.MIX        <- Memory model specific object file
  2091.  
  2092.              Contents of LC3.LZH & LC6.LZH (Lattice C Specific Files)
  2093.  
  2094.                ASMALL.BAT        <- Small model assembler driver
  2095.                ALARGE.BAT        <- Large model assembler driver
  2096.                ADMODEL.BAT       <- D model assembler driver
  2097.                APMODEL.BAT       <- P model assembler driver
  2098.                AHUGE.BAT         <- Huge model assembler driver
  2099.                LCOMPILE.BAT      <- Large model - compile *.c
  2100.                SCOMPILE.BAT      <- Small model - compile *.c
  2101.                PCOMPILE.BAT      <- P model - compile *.c
  2102.                DCOMPILE.BAT      <- D model - compile *.c
  2103.                HCOMPILE.BAT      <- Huge model - compile.c
  2104.                LCS.BAT           <- Small model compiler driver
  2105.                LCL.BAT           <- Large model compiler driver
  2106.                LCP.BAT           <- P model compiler driver
  2107.                LCD.BAT           <- D model compiler driver
  2108.                LOADLC.BAT        <- Link driver for BOSSDEMO
  2109.                LWIN.LIB *        <- Large model library
  2110.                SWIN.LIB *        <- Small model library
  2111.                MAKELIB.BAT       <- Build LIB file from OBJ(s)
  2112.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2113.                WINDOWS.FNS       <- Type checking header
  2114.                ?VLIB.OBJ         <- Memory model specific object file
  2115.  
  2116.                * Not present in the LC3.LZH archive. The libraries for 
  2117.                the Lattice 3.41 compiler will have to be created locally.  
  2118.                See "Library Rebuilding" for instructions on how to 
  2119.                accomplish this.
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.                                                            Page: 34
  2131.                                                      The Window BOSS
  2132.  
  2133.  
  2134.  
  2135.         The SOURCE Distribution Diskette - continued.
  2136.              
  2137.  
  2138.  
  2139.              Contents of DLC.LZH (Datalight Specific)
  2140.  
  2141.                ASMALL.BAT        <- Small model assembler driver
  2142.                ALARGE.BAT        <- Large model assembler driver
  2143.                ADMODEL.BAT       <- D model assembler driver
  2144.                APMODEL.BAT       <- P model assembler driver     
  2145.                CCS.BAT           <- Small model compiler driver
  2146.                CCL.BAT           <- Large model compiler driver
  2147.                CCD.BAT           <- D model compiler driver
  2148.                CCP.BAT           <- P model compiler driver
  2149.                LCOMPILE.BAT      <- Large model - compile *.c
  2150.                SCOMPILE.BAT      <- Small model - compile *.c
  2151.                DCOMPILE.BAT      <- D model - compile *.c
  2152.                PCOMPILE.BAT      <- P model - compile *.c
  2153.                LOADDLC.BAT       <- Link driver for BOSSDEMO
  2154.                LWIN.LIB          <- Large model library
  2155.                SWIN.LIB          <- Small model library
  2156.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2157.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2158.                WINDOWS.FNS       <- Type checking header
  2159.                ?DLVLIB.OBJ       <- Memory model specific object file
  2160.  
  2161.              Contents of TC2.LZH (Borland Turbo C Specific)
  2162.  
  2163.                ALARGE.BAT        <- Large model assembler driver
  2164.                ASMALL.BAT        <- Small model assembler driver
  2165.                BOSSDEMO.PRJ      <- TC Project file for BOSSDEMO
  2166.                SAMPLE.PRJ        <- TC Project file for SAMPLE
  2167.                HELLO.PRJ         <- TC Project file for HELLO
  2168.                LCOMPILE.BAT      <- TCC - Large model - compile *.c 
  2169.                SCOMPILE.BAT      <- TCC - Small model - compile *.c
  2170.                CCOMPILE.BAT      <- TCC - Compact model - compile *.c
  2171.                MCOMPILE.BAT      <- TCC - Medium model - compile *.c
  2172.                HCOMPILE.BAT      <- TCC - Huge model - compile *.c
  2173.                LOADTC.BAT        <- Tlink driver for BOSSDEMO
  2174.                LWIN.LIB          <- Large model library
  2175.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2176.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2177.                SWIN.LIB          <- Small model library
  2178.                TCCL.BAT          <- Large model TCC compiler driver
  2179.                TCCS.BAT          <- Small model TCC compiler driver
  2180.                TCCM.BAT          <- Medium model TCC compiler driver
  2181.                TCCC.BAT          <- Compact model TCC compiler driver
  2182.                TCCH.BAT          <- Huge model TCC compiler driver
  2183.                WINDOWS.FNS       <- Type checking header
  2184.                ?MSVLIB.OBJ       <- Memory model specific object file          
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.                                                            Page: 35
  2192.                                                      The Window BOSS
  2193.  
  2194.  
  2195.  
  2196.         The SOURCE Distribution Diskette - continued.
  2197.              
  2198.  
  2199.  
  2200.              Contents of MS5.LZH & MS6.LZH (Microsoft C Specific Files)
  2201.  
  2202.                ASMALL.BAT        <- Small model assembler driver
  2203.                ALARGE.BAT        <- Large model assembler driver
  2204.                AMEDUIM.BAT       <- Medium model assembler driver
  2205.                ACOMPACT.BAT      <- Compact model assembler driver
  2206.                AHUGE.BAT         <- Huge model assembler driver
  2207.                LCOMPILE.BAT      <- Large model - compile *.c
  2208.                SCOMPILE.BAT      <- Small model - compile *.c
  2209.                MCOMPILE.BAT      <- Medium model - compile *.c
  2210.                CCOMPILE.BAT      <- Compact model - compile *.c
  2211.                HCOMPILE.BAT      <- Huge model - compile *.c
  2212.                MCCL.BAT          <- Large model compiler driver
  2213.                MCCS.BAT          <- Small model compiler driver
  2214.                MCCM.BAT          <- Medium model compiler driver
  2215.                MCCC.BAT          <- Compact model compiler driver
  2216.                MCCH.BAT          <- Huge mode compiler driver
  2217.                LOADMS.BAT        <- Link driver for BOSSDEMO
  2218.                LWIN.LIB **       <- Large model library
  2219.                SWIN.LIB **       <- Small model library
  2220.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2221.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2222.                *.MAK (6.0 Only)  <- MAKE files - BOSSDEMO, HELLO, SAMPLE
  2223.                WINDOWS.FNS       <- Type checking header
  2224.                ?MSVLIB.OBJ       <- Memory model specific object file
  2225.  
  2226.                ** Not present in the MS5.LZH archive. The libraries for 
  2227.                the Microsoft 5.X compiler will have to be created 
  2228.                locally. See "Library Rebuilding" for instructions on how 
  2229.                to accomplish this.
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.                                                            Page: 36
  2253.                                                      The Window BOSS
  2254.  
  2255.  
  2256.  
  2257.         The SOURCE Distribution Diskette - continued.
  2258.              
  2259.  
  2260.  
  2261.  
  2262.              Contents of MSQC20.LZH & MSQC25.LZH 
  2263.              (Microsoft Quick C Specific Files)
  2264.  
  2265.                ASMALL.BAT        <- Small model assembler driver
  2266.                ALARGE.BAT        <- Large model assembler driver
  2267.                AMEDUIM.BAT       <- Medium model assembler driver
  2268.                ACOMPACT.BAT      <- Compact model assembler driver
  2269.                AHUGE.BAT         <- Huge model assembler driver   
  2270.                SCOMPILE.BAT      <- Small model - compile *.c
  2271.                LCOMPILE.BAT      <- Large model - compile *.c
  2272.                MCOMPILE.BAT      <- Medium model - compile *.c
  2273.                CCOMPILE.BAT      <- Compact model - compile *.c
  2274.                HCOMPILE.BAT      <- Huge model - compile *.c
  2275.                MCCL.BAT          <- Large model compiler driver
  2276.                MCCS.BAT          <- Small model compiler driver
  2277.                MCCM.BAT          <- Medium model compiler driver
  2278.                MCCC.BAT          <- Compact model compiler driver
  2279.                MCCH.BAT          <- Huge model compiler driver
  2280.                LOADMS.BAT        <- Link driver for BOSSDEMO
  2281.                LWIN.LIB **       <- Large model library
  2282.                SWIN.LIB **       <- Small model library
  2283.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2284.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2285.                *.MAK             <- MAKE files - BOSSDEMO, HELLO, SAMPLE
  2286.                WINDOWS.FNS       <- Type checking header
  2287.                ?MSVLIB.OBJ       <- Memory model specific object file
  2288.  
  2289.                ** Not present in the MSQC20.LZH archive.  The libraries 
  2290.                for the Microsoft QuickC 2.0 compiler will have to be 
  2291.                created locally.  See "Library Rebuilding" for 
  2292.                instructions on how to accomplish this.
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.                                                            Page: 37
  2314.                                                      The Window BOSS
  2315.  
  2316.  
  2317.  
  2318.         The SOURCE Distribution Diskette - continued.
  2319.              
  2320.  
  2321.  
  2322.  
  2323.              Contents of ZTC.LZH (Zortech C Specific Files)
  2324.  
  2325.                ACOMPACT.BAT      <- Compact model assembler driver
  2326.                ALARGE.BAT        <- Large model assembler driver
  2327.                ASMALL.BAT        <- Small model assembler driver
  2328.                AMEDIUM.BAT       <- Medium model assembler driver
  2329.                AHUGE.BAT         <- Huge model assembler driver
  2330.                CCOMPILE.BAT      <- Compact model - compile *.c
  2331.                LCOMPILE.BAT      <- Large model   - compile *.c
  2332.                HCOMPILE.BAT      <- Huge model    - compile *.c
  2333.                MCOMPILE.BAT      <- Medium model  - compile *.c
  2334.                SCOMPILE.BAT      <- Small model   - compile *.c
  2335.                LOADZTC.BAT       <- Link driver for BOSSDEMO
  2336.                LWIN.LIB          <- Larger model library
  2337.                MAKELIB.BAT       <- Build LIB file from OBJ(s)
  2338.                MAKELIB.CMD       <- Data file for makelib.bat
  2339.                SWIN.LIB          <- Small model library
  2340.                WINDOWS.FNS       <- Type checking header file
  2341.                ZTCC.BAT          <- Compact model compiler driver
  2342.                ZTCCB.BAT         <- Compact model big compiler driver
  2343.                ZTCL.BAT          <- Large model compiler driver
  2344.                ZTCLB.BAT         <- Large model big compiler driver
  2345.                ZTCM.BAT          <- Medium model compiler driver
  2346.                ZTCMB.BAT         <- Medium model big comiler driver
  2347.                ZTCS.BAT          <- Small model compiler driver
  2348.                ZTCSB.BAT         <- Small model big compiler driver
  2349.                ZTCH.BAT          <- Huge model compiler driver
  2350.                ZTCHB.BAT         <- Huge model big compiler driver
  2351.                ?MSVLIB.OBJ       <- Memory model specific object files
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.                                                            Page: 38
  2375.                                                      The Window BOSS
  2376.  
  2377.  
  2378.  
  2379.         The SOURCE Distribution Diskette - continued.
  2380.              
  2381.  
  2382.  
  2383.  
  2384.              Contents of WATCOM.LZH
  2385.  
  2386.                ACOMPACT.BAT      <- Compact model assembler driver
  2387.                ALARGE.BAT        <- Large model assembler driver
  2388.                ASMALL.BAT        <- Small model assembler driver
  2389.                AMEDIUM.BAT       <- Medium model assembler driver
  2390.                AHUGE.BAT         <- Huge model assembler driver
  2391.                WCCS.BAT          <- Small model compiler driver
  2392.                WCCL.BAT          <- Large model compiler driver
  2393.                WCCM.BAT          <- Medium model compiler driver
  2394.                WCCC.BAT          <- Compact model compiler driver
  2395.                WCCH.BAT          <- Huge model compiler driver
  2396.                XCC.BAT           <- EXPRESS C compiler driver
  2397.                CCOMPILE.BAT      <- Compact model - compile *.c
  2398.                LCOMPILE.BAT      <- Large model   - compile *.c
  2399.                MCOMPILE.BAT      <- Medium model  - compile *.c
  2400.                SCOMPILE.BAT      <- Small model   - compile *.c
  2401.                HCOMPILE.BAT      <- Huge model    - compile *.c
  2402.                LOADWAT.BAT       <- Link driver for BOSSDEMO
  2403.                LOADWEC.BAT       <- Link driver for BOSSDEMO (EXPRESS C)
  2404.                MAKELIB.BAT       <- Build LIB from OBJ(s)
  2405.                MAKELIB.CMD       <- Data file for MAKELIB.BAT
  2406.                SWIN.LIB          <- Small model library
  2407.                LWIN.LIB          <- Large model library
  2408.                XMWIN.LIB         <- EXPRESS C library
  2409.                WINDOWS.FNS       <- Type checking header
  2410.                ?WCVLIB.OBJ       <- Memory model specific object files
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.                                                            Page: 39
  2436.                                                      The Window BOSS
  2437.  
  2438.  
  2439.  
  2440.         6. Installation, Compiling, Linking 
  2441.  
  2442.         6.1. Installation
  2443.  
  2444.              By the numbers:
  2445.  
  2446.                 1) MAKE A BACKUP OF ALL DISKS !!!
  2447.  
  2448.                 2) Shareware diskettes - Use LHARC to unarchive the 
  2449.                    various LZH files.  You will need 1200+k of free disk 
  2450.                    space for all of the files!  Alternatively you can 
  2451.                    extract only those files you need for use with a 
  2452.                    specific compiler. Simply use LHARC to extract all the 
  2453.                    files from BOSS_SUP.LZH then the library(s) you need
  2454.                    from BOSS_LB?.LZH, for example:
  2455.  
  2456.                           B>A:LHARC E A:BOSS_SUP
  2457.                           B>A:LHARC E A:BOSS_LB1 SMSC5.LIB
  2458.  
  2459.                 2) Source Code diskettes - Use LHARC to unarchive 
  2460.                    CFILES.LZH and ASMFILES.LZH. Then, depending upon the 
  2461.                    compiler you intend to use, unarchive only ONE of the 
  2462.                    following: LC3.LZH, LC6.LZH, MS5.LZH, MS6.LZH, 
  2463.                    MSQC20.LZH, MSQC25.LZH, DLC.LZH, C86.LZH, TC2.LZH, 
  2464.                    MIX.LZH, WATCOM.LZH, ZTC.LZH, or AZTEC.LZH. If you 
  2465.                    plan on unarchiving all of the compiler specific LZH 
  2466.                    files you will need aproximately 2 megabytes of free 
  2467.                    disk space!
  2468.  
  2469.                 3) Copy the LIBrary that corresponds to the compiler you 
  2470.                    are using onto the disk(s) and/or sub-directories that 
  2471.                    contain your "C" compiler's run time libraries . Be 
  2472.                    sure that the small model library is named "SWIN.LIB" 
  2473.                    (see notes below). The large model library should be 
  2474.                    named "LWIN.LIB". The Mix Power C library is MWIN.MIX.  
  2475.                    The EXPRESS C library is XMWIN.LIB.  
  2476.  
  2477.                    ** Shareware Users Note ** - The examples used in the 
  2478.                    documentation assume the library's name to be SWIN.LIB 
  2479.                    (small memory model). You may want to rename the 
  2480.                    library you extracted to conform to this naming 
  2481.                    convention to eliminate any possible confusion.  For 
  2482.                    example:
  2483.  
  2484.                             B:>RENAME SMSC5.LIB SWIN.LIB
  2485.  
  2486.                    ** Shareware Users Note ** - Large model libraries are 
  2487.                    not provided as part of the shareware disk set.
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.                                                            Page: 40
  2497.                                                      The Window BOSS
  2498.  
  2499.  
  2500.  
  2501.         Installation - continued.
  2502.  
  2503.  
  2504.  
  2505.                 4) Copy (or rename) the compiler driver batch file that 
  2506.                    corresponds to the compiler you are using to:
  2507.  
  2508.                                      CSM.BAT
  2509.  
  2510.                 5) If WINDOWS.FNS is not contained in the archive for 
  2511.                    your compiler, or is not present after you unarchive 
  2512.                    the required files, copy (or rename) WINDOWS.FN5, 
  2513.                    WINDOWS.FN6 or WINDOWS.FNZ to WINDOWS.FNS. The 
  2514.                    following table can be used:
  2515.  
  2516.                        Compiler            File
  2517.                        ---------           -----
  2518.                        LC3 & LC6           WINDOWS.FN5
  2519.                        Power C             WINDOWS.FN5
  2520.                        WATCOM, EXPRESS C   WINDOWS.FN5
  2521.                        MSC5, Quick C 2.0   WINDOWS.FN5
  2522.                        MSC6, Quick C 2.5   WINDOWS.FN6
  2523.                        Turbo C             WINDOWS.FN5
  2524.  
  2525.                        CI86                -- None --
  2526.  
  2527.                        AZTEC               WINDOWS.FNZ
  2528.                        DLC                 WINDOWS.FNZ
  2529.                        ZORTECH             WINDOWS.FNZ
  2530.  
  2531.                 6) Read the "Compiling", "Linking", and "General Notes" 
  2532.                    sections of this manual.  The "General Notes" section 
  2533.                    has across the board information that everyone should 
  2534.                    review and compiler specific tips that are very 
  2535.                    important.
  2536.  
  2537.                 7) Suggestion - After installing The Window BOSS build 
  2538.                    the HELLO program using the command line compiler and 
  2539.                    command line linker to confirm that you have installed 
  2540.                    everything correctly.  To do this you will need: 
  2541.                        
  2542.                        YOUR COMPILER  - Check PATH and ENVIRONMENT setup
  2543.                        CSM.BAT        - Compiler driver batch file
  2544.                        SWIN.LIB       - small memory model library
  2545.                        WINDOWS.H      - Window BOSS INCLUDE file
  2546.                        WINDOWS.FNS    - Window BOSS INCLUDE file
  2547.                        WINDOWS.EXT    - Window BOSS INCLUDE file
  2548.                        HELLO.C        - C Program
  2549.  
  2550.                 8) Remember there is no magic to using The Window BOSS. 
  2551.                    It's simple!!
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.                                                            Page: 41
  2558.                                                      The Window BOSS
  2559.  
  2560.  
  2561.  
  2562.         Installation/Compiling/Linking - continued.
  2563.  
  2564.  
  2565.  
  2566.         6.2. Compiling
  2567.  
  2568.              Compile your source code in the following manner:
  2569.  
  2570.                                   C>csm hello
  2571.  
  2572.              Notes:
  2573.  
  2574.                ** ALL compilers should be invoked with the compiler 
  2575.                driver batch files supplied with The Window BOSS.  Some 
  2576.                compilers require ".c" to be added to the name of the 
  2577.                source file e.g. "csm hello.c".  The examples in this 
  2578.                manual assume you are creating small memory model 
  2579.                programs.
  2580.  
  2581.                The Window BOSS includes "windows.h", "windows.fns", and 
  2582.                "windows.ext".  These files can be placed with your 
  2583.                compiler's other INCLUDE files or they can remain in the 
  2584.                same directory as your "C" programs.  Depending upon your 
  2585.                installation, you may have to edit HELLO.C and/or 
  2586.                WINDOWS.H to follow the "" .vs. <> include file 
  2587.                convention.  All of BOSS's includes are of the form:
  2588.  
  2589.                              #include "include_file_name"
  2590.  
  2591.                If you examine CSM.BAT you will notice some command line 
  2592.                parameters that are passed to your compiler.  These 
  2593.                command line parameters are an absolute requirement and 
  2594.                must always be present.  They are used by "windows.h" to 
  2595.                set various conditions required by your specific compiler.
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.                                                            Page: 42
  2619.                                                      The Window BOSS
  2620.  
  2621.  
  2622.  
  2623.         Installation/Compiling/Linking - continued.
  2624.  
  2625.  
  2626.  
  2627.         6.3. Linking
  2628.  
  2629.              Simply specify the ?WIN.LIB file that corresponds to the 
  2630.              compiler/memory model you are using.  Don't forget to 
  2631.              include your compilers runtime library as well. The 
  2632.              following examples demonstrate basic linking using the small 
  2633.              model library (medium for MIX Power C):
  2634.  
  2635.                 Lattice 
  2636.                   link c+hello,hello,,swin+lcm+lc+lapi+lcr  <- 3.41
  2637.                   lmb hello,hello,,swin+lcr;                <- 6.XX
  2638.  
  2639.                 Computer Innovations
  2640.                   link hello,hello,,swin+c86s2s
  2641.  
  2642.                 Datalight
  2643.                   link c+hello,hello,hello,swin+nl
  2644.  
  2645.                 Microsoft C
  2646.                   link hello,hello,,swin                    <- 5.X
  2647.                   link hello,hello,,swin;                   <- 6.X
  2648.  
  2649.                 Microsoft QuickC
  2650.                   link hello,hello,,swin                    <- 2.0
  2651.                   qlink hello,hello,,swin                   <- 2.5
  2652.                 
  2653.                 Borland
  2654.                   tlink /c c0s hello,hello,hello,swin emu maths cs
  2655.  
  2656.                 Mix Power C
  2657.                   pcl hello;mwin [5k,40k,0]
  2658.  
  2659.                 Aztec
  2660.                   ln hello swin.lib m.lib c.lib
  2661.  
  2662.                 Watcom
  2663.                   wlink file hello library swin,maths,clibs
  2664.  
  2665.                 EXPRESS C
  2666.                   wlink file hello library xmwin,wcexpl
  2667.  
  2668.                 ZORTECH
  2669.                   blink hello,hello,,swin
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.                                                            Page: 43
  2680.                                                      The Window BOSS
  2681.  
  2682.  
  2683.  
  2684.         Installation/Compiling/Linking - continued.
  2685.  
  2686.  
  2687.  
  2688.         Linking Notes:
  2689.  
  2690.         The linking examples may have to be modified to include the 
  2691.         complete path specifiers for each library.  For example:
  2692.  
  2693.                        link hello,hello,,c:\msc5\lib\swin
  2694.  
  2695.         Fixup offset errors are always the result attempting to link code 
  2696.         compiled under one memory model with libraries created for use 
  2697.         with another memory model.
  2698.  
  2699.         Unresolved externals can be caused by missing user functions, 
  2700.         missing library functions, linking command errors, missing 
  2701.         project files, missing MAKE files, or attempting to link a non 
  2702.         conforming library. Misplaced commas on the command line and C 
  2703.         code typing errors are the most common problems.  In the case of 
  2704.         integrated environment fans (Quick C, MSC 6.0 PWB, Turbo C) it is 
  2705.         almost always due to forgetting to SET THE PROGRAM LIST to 
  2706.         include The Window BOSS library or, in the case of Turbo C, 
  2707.         forgetting to create a project file that includes an entry for 
  2708.         The Window BOSS library.
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.                                                            Page: 44
  2741.                                                      The Window BOSS
  2742.  
  2743.  
  2744.  
  2745.         7. General Notes
  2746.  
  2747.         Source code is provided for all of the high level data entry 
  2748.         functions, the help system, and the popup menu functions.  This 
  2749.         is done so that you (1) have a wide variety of templates to base 
  2750.         any local data entry functions on and (2) have the source to the 
  2751.         code to those functions (help & popup) which are commonly changed 
  2752.         to suit individual taste.
  2753.  
  2754.         WN_BIOS.C and the various assembler files (*.ASM) contain all of 
  2755.         the BIOS interface functions.  Only v_kstat(), v_border(), 
  2756.         _vidblt(), and xferdata() are written in assembly language!!  
  2757.  
  2758.         This one is REAL important - Both the C and assembly functions 
  2759.         make very heavy use of pointers.  The code contains numerous 
  2760.         checks to ensure that memory, outside of that in use by the 
  2761.         program, is not corrupted.  If you attempt to do something that 
  2762.         would cause memory to be corrupted an error message will appear 
  2763.         and your program will exit.  This message will usually say that a 
  2764.         bad handle was passed to some function.  This error is normally 
  2765.         caused by a stray pointer in the application code!  Check all 
  2766.         your pointer operations.  Doing strcpy's to arrays with 
  2767.         insufficient space will always cause this type of problem.
  2768.  
  2769.         Generally speaking, the members of the window control block 
  2770.         (refer to windows.h) should not be modified unless you are 
  2771.         familiar with how they are used by the various functions.  We 
  2772.         suggest you obtain a hard copy of "windows.h" and review it even 
  2773.         if you don't have any intentions of modifying the code.  There is 
  2774.         a great deal of information contained in "windows.h" that you may 
  2775.         find helpful when writing your application.
  2776.  
  2777.         Although the routines appear to support the multi page 
  2778.         capabilities of the IBM Color Card, actual support of this 
  2779.         feature has not been implemented.  Invoking the functions with 
  2780.         references to video pages other than than those documented might 
  2781.         produce interesting, but undesired results.  
  2782.  
  2783.         Programs such as Wordstar and Lotus change the video mode when 
  2784.         they run.  If your system is equipped with a color monitor and 
  2785.         your windows are appearing in black and white, issue a call to 
  2786.         v_smode to set the video mode to 3.  Alternatively, you can use 
  2787.         the "MODE CO80" command at DOS level before you run your 
  2788.         application.  
  2789.  
  2790.         The best way to manipulate the method by which windows are 
  2791.         updated is via the wn_dmode() function.  Calling wn_dmode(PAINT) 
  2792.         causes the image to be painted while wn_dmode(FLASH) causes the 
  2793.         image to be flash updated.  Flash updating is the preferred 
  2794.         (default) method.  Please keep in mind that windows are always 
  2795.         flash updated on monochrome systems. 
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.                                                            Page: 45
  2802.                                                      The Window BOSS
  2803.  
  2804.  
  2805.  
  2806.         7.1. Upgrading - Existing Applications Impact
  2807.  
  2808.         If you are upgrading from a previous version of The Window BOSS 
  2809.         be sure to re-compile and re-link your application.  This will 
  2810.         eliminate the possibility of any "unusual" problems.
  2811.  
  2812.         7.2. Current Compilers & Libraries
  2813.  
  2814.         The distribution libraries were created on an IBMPC/AT under DOS 
  2815.         3.3 using Lattice 3.41, Lattice 6.02, Microsoft 5.1, Microsoft 
  2816.         6.0, Microsoft QuickC 2.0, Microsoft QuickC 2.5, Borland Turbo C 
  2817.         2.0, Datalight 3.10, Aztec 4.2b-1, Watcom C 7.0, Mix Power C 
  2818.         1.3.0, Zortech 2.06, and Computer Innovations CI86 2.30A.  Marion 
  2819.         was used to create the LIB files for CI86.  Microsoft's LIB was 
  2820.         used for the Microsoft variants, Datalight and Zortech. Lattice, 
  2821.         Aztec, Watcom  and the Mix Power C libraries were created with 
  2822.         the library managers shipped with the respective compilers.  Test 
  2823.         hardware: IBMPC/XT/AT, PS/2, with IBM Monochrome, CGA, EGA, and 
  2824.         VGA video adapters.  Additionally, a wide variety of clones 
  2825.         (8088, 8086, 80186, 80286, 80386) with brand name and noname 
  2826.         components were also tested.
  2827.  
  2828.         Several of the compilers support a compile time command line 
  2829.         parameter that results in structures being byte aligned instead 
  2830.         of word aligned.  In all cases, the default (i.e. no command line 
  2831.         parameter) option was used to compile the modules in the various 
  2832.         libraries.
  2833.  
  2834.         7.3. EGA & VGA Expanded Line & Column Modes
  2835.  
  2836.         The Window BOSS supports the Expanded Line and Column modes of 
  2837.         both the EGA and VGA video adapters.  However, in order to 
  2838.         preserve The Window BOSS's device independence you will have to 
  2839.         do a little extra work if you intend to write an application that 
  2840.         is going to take advantage of one of these expanded modes.  The 
  2841.         rules are quite simple.  Your application must remain in one 
  2842.         mode.  It can be (25 x 80), (80 x 132), (80 x 43), (80 x 50), or 
  2843.         whatever size your adapter supports.  The adapter must be in the 
  2844.         mode you chose prior to calling ANY of The Window BOSS functions.  
  2845.         WN_PSINIT() must be called first, called only once, and be called 
  2846.         with parameters that reflect the physical screen size that your 
  2847.         application is going to use.  That's all there is to it!  
  2848.  
  2849.         7.4. Terminate and Stay Resident (TSR) Programming
  2850.  
  2851.         The Window BOSS has been successfully incorporated in TSR 
  2852.         programs. Due to the complexities involved in writing and 
  2853.         resolving conflicts associated with TSR(s) and the lack of any 
  2854.         real standards for TSR(s) Star Guidance Consulting, Inc. can not 
  2855.         provide any form of support or assistance for TSR related 
  2856.         problems.  We will, however, work with you in resolving any 
  2857.         problem you can replicate when the program is not resident.
  2858.  
  2859.  
  2860.  
  2861.  
  2862.                                                            Page: 46
  2863.                                                      The Window BOSS
  2864.  
  2865.  
  2866.  
  2867.         General Notes - continued.
  2868.  
  2869.  
  2870.         7.5. Important Globals
  2871.  
  2872.         Several global symbols are used by the various functions all are 
  2873.         defined in "windows.c" and referenced in "windows.ext".  A few 
  2874.         are worthy of special mention:
  2875.  
  2876.                                  int wn_dmaflg;
  2877.                                  int wn_sbit;
  2878.                                  int wns_escape;
  2879.  
  2880.         7.5.1. wns_dmaflg
  2881.  
  2882.              wn_dmaflg when TRUE enables direct writes into video ram. 
  2883.              This is the default setting and should work in all cases.  
  2884.              Setting wn_dmaflg to FALSE will disable these direct writes. 
  2885.              When wn_dmaflg is FALSE the BIOS video routines are used. 
  2886.              This results in slower screen updates.  However, this method 
  2887.              does have the advantage of being considered "well behaved" 
  2888.              by IBM's Topview, Microsoft's Windows, and DESQ.  
  2889.              
  2890.         7.5.2. wn_sbit
  2891.  
  2892.              wn_sbit controls the window refresh rate on systems with 
  2893.              color cards.  When set to SLOW (defined in windows.h) window 
  2894.              displays will appear to be painted on the screen rather than 
  2895.              flash displayed. This is the default value.  Setting wn_sbit 
  2896.              to FAST enables flash displays. Artistic use of wn_sbit can 
  2897.              give your application that extra visual touch. Experiment!
  2898.  
  2899.              From a performance standpoint, the fastest (flicker & snow 
  2900.              free) screen updates will occur with wn_dmaflg=TRUE 
  2901.              (default) and wn_sbit=FAST (default).  The key words here 
  2902.              are flicker and snow free.  Scrolling speed can be 
  2903.              increased, with a proportional increase in flicker 
  2904.              (perhaps), by using wn_scroll() function to set the 
  2905.              scrolling method for the window to BIOS.  This technique 
  2906.              will provide the fastest screen updates and scrolling on 
  2907.              color systems.
  2908.  
  2909.          7.5.3. wns_escape
  2910.  
  2911.              wns_escape is set to TRUE whenever wn_input detects that the 
  2912.              escape key has been pressed.  Since wn_input is the 
  2913.              underlying logic for the entire data entry package, 
  2914.              knowledge of this global may help you manage your data entry 
  2915.              activities better.  For example, you may want to follow one 
  2916.              logic path if data entry completed normally and another if 
  2917.              data entry was terminated because the escape key was 
  2918.              pressed.
  2919.  
  2920.  
  2921.  
  2922.  
  2923.                                                            Page: 47
  2924.                                                      The Window BOSS
  2925.  
  2926.  
  2927.  
  2928.         General Notes - continued.
  2929.  
  2930.  
  2931.  
  2932.         7.6. Microsoft C
  2933.  
  2934.         Some large model programs may require a stack greater than 4096 
  2935.         bytes.
  2936.  
  2937.         PWB and Integrated Development Environment fans take note - If 
  2938.         program and/or data space is at a premium disabling debugging can 
  2939.         sometimes restore significant program and/or data space.  
  2940.  
  2941.         Microsoft Version 5.XX libraries were generated using the "/Zl" 
  2942.         command line parameter. This should insure compatibility with 
  2943.         previous versions of the compiler.  
  2944.  
  2945.         Microsoft Version 6.XX Programmer Workbench fans must define 
  2946.         "MSCV6=1" in the defines dialog box.  Do this by selecting 
  2947.         "OPTIONS" then "C COMPILER OPTIONS".  
  2948.  
  2949.         The same rules that apply to the creation of MAKE files for Quick 
  2950.         C (SETTING THE PROGRAM LIST) also apply.  The program list can be 
  2951.         set by selecting the MAKE dialog box, then SET PROGRAM LIST.  Be 
  2952.         sure to include an explicit entry for The Window BOSS library.
  2953.  
  2954.         7.7. Microsoft QuickC
  2955.  
  2956.         Microsoft QuickC - All Integrated Development Environment users 
  2957.         MUST create MAKe files in order to be able to create EXEcutable 
  2958.         programs from within the Developmental Environment.  The MAKe
  2959.         file must contain the names of all of the programs that comprise 
  2960.         the application along with specific entries for all 3rd party 
  2961.         libraries being used.  In the case of 3rd party libraries, the 
  2962.         complete path specification for the library must be provided 
  2963.         (e.g. c:\msc\lib\swin.lib).  The MAKe file is created when you set 
  2964.         the program list.  Select the MAKE dialog BOX, then SET PROGRAM 
  2965.         LIST. Follow the standard rules for the creation of "MAK" files.
  2966.  
  2967.         QuickC 2.0 Integrated Development Environment
  2968.  
  2969.         MSCV4=1 must be defined in "COMPILER FLAGS" "DEFINES" dialog box 
  2970.         (select OPTIONS, MAKE, COMPILER FLAGS, then fill in DEFINES with 
  2971.         MSCV4=1).
  2972.  
  2973.         QuickC 2.5 Integrated Development Environment
  2974.  
  2975.         MSCV6=1 must be defined in "COMPILER FLAGS" "DEFINES" dialog box 
  2976.         (select OPTIONS, MAKE, COMPILER FLAGS, then fill in DEFINES with 
  2977.         MSCV6=1).
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.                                                            Page: 48
  2985.                                                      The Window BOSS
  2986.  
  2987.  
  2988.  
  2989.         General Notes - continued.
  2990.  
  2991.  
  2992.  
  2993.         7.8. Borland Turbo C
  2994.  
  2995.         Borland Turbo C pre version 1.5 users who prefer "The Integrated 
  2996.         Environment" over the "Command-Line Version" MUST define the 
  2997.         symbol "BORLAND=1". (Select Options, Compiler, Defines and enter 
  2998.         "BORLAND=1" in the dialogue box without quotes and in upper 
  2999.         case.)
  3000.  
  3001.         Integrated Environment users MUST create PROJECT files in order 
  3002.         to be able to create EXEcutable programs from within the Integrated 
  3003.         Environment.  The PROJECT file must contain the names of all of 
  3004.         the programs that comprise the application along with specific 
  3005.         entries for all 3rd party libraries being used.  In the case of 
  3006.         3rd party libraries, the complete path specification for the 
  3007.         library must be provided (e.g. c:\turboc\lib\swin.lib).
  3008.  
  3009.         7.9. MIX Power C
  3010.  
  3011.         Mix Power C - (1) Merge files must be created and edited with 
  3012.         text editors that do not insert ^Z for end of file. (2) PCO.EXE 
  3013.         should be in the default directory (the same directory that your 
  3014.         C files are in). (3) The linker should always be told the amount 
  3015.         of memory to be assigned to the stack, heap, and far heap.  Since 
  3016.         The Window BOSS uses both heap and far memory outside of your 
  3017.         program, it is imperative that PCL be invoked with reasonable 
  3018.         parameters. Typical values are [5k,40k,0] or [5k,40k,100k]. Refer 
  3019.         to the chapter on the Mix Linker in the Power C manual.
  3020.  
  3021.         7.10. Datalight C
  3022.  
  3023.         BOSSDEMO.C and WN_FRMGE.C must be compiled with the BIG compiler.
  3024.  
  3025.         7.11. Zortech C
  3026.  
  3027.         Zortech C - ZORLIB (as distributed with version 2.0 of Zortech C) 
  3028.         can not produce a correctly formatted library of The Window BOSS 
  3029.         functions.  Microsoft's library manager LIB was used to create 
  3030.         the libraries distributed with The Window BOSS.  Please do not 
  3031.         attempt to recreate or update any of The Window BOSS libraries 
  3032.         with ZORLIB.  Zortech has been notified of the problem.
  3033.  
  3034.         BOSSDEMO.C must be compiled with the BIG compiler.
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.                                                            Page: 49
  3046.                                                      The Window BOSS
  3047.  
  3048.  
  3049.  
  3050.         General Notes - continued.
  3051.  
  3052.  
  3053.  
  3054.         7.12. Watcom C
  3055.  
  3056.         Express C- has a difficult time with the BOSSDEMO program unless 
  3057.         you edit BOSSDEMO.C and set MAXWIN to around 50.  You will also 
  3058.         need to play with the OPTION STACK when linking (2k seems to 
  3059.         work).
  3060.  
  3061.  
  3062.         7.13. Lattice C
  3063.  
  3064.         Lattice C - Lattice large model programs sometimes require the 
  3065.         heap to be set to a minimum value.  This can be accomplished by 
  3066.         setting _MNEED or specifying the stack and heap size at run time. 
  3067.         A minimum heap size of 32k will usually satisfy most 
  3068.         applications. REMEMBER: This is for the LARGE model only.  Refer 
  3069.         to the Lattice reference manuals for further information on 
  3070.         setting the stack and heapsize.
  3071.  
  3072.         7.14. Aztec C
  3073.  
  3074.         Aztec C - Use the following command when recompiling BOSSDEMO.C:
  3075.  
  3076.                                csm -Z6000 bossdemo
  3077.  
  3078.         The Aztec C linker (LN) sometimes requires The Window BOSS 
  3079.         library to be included as part of the command line twice to 
  3080.         eliminate unresolved externals.  For example, to link the HELLO 
  3081.         program the command line would be:
  3082.  
  3083.                 ln hello swin.lib swin.lib m.lib c.lib
  3084.                          ^               ^
  3085.                           BOSS Library
  3086.  
  3087.         7.15. Feedback
  3088.  
  3089.         PLEASE - Pass along your comments.  The Window BOSS is your tool.  
  3090.         If you find any logic errors let us know.  We are committed to 
  3091.         making The Window BOSS the best price performer available.  Call, 
  3092.         write, or if you prefer, you can reach us via CompuServe, GENIE, 
  3093.         or BIX.  Our CompuServe electronic mail ID is [71565,1001], our 
  3094.         GENIE mail address is "MONGELLUZZO", our BIX NAME is 
  3095.         "pmongelluzzo". Remember, there is no reason to sit, steam, or 
  3096.         complain to those who can not provide any real form of support.  
  3097.         Lastly, if you use The Window BOSS, register your copy.  The 
  3098.         Shareware System will only work if you support it!
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                                                            Page: 50
  3107.                                                      The Window BOSS
  3108.  
  3109.  
  3110.  
  3111.         7.16. Hints on Resolving Common Problems
  3112.  
  3113.         Unresolved Externals - Most common with the programming 
  3114.         environments of Turbo C and Quick C.  Both of these programming 
  3115.         environments require "program lists" or "make files".  This type 
  3116.         of error can also be caused by not explicitly specifying a Window 
  3117.         BOSS library on the link command line.  All linkers must have 
  3118.         explicit knowledge of what 3rd party libraries are to be linked 
  3119.         with the compiler libraries and your applications object files. 
  3120.         This problem is usually resolved by creating a program list or 
  3121.         make file that includes a explicit reference to one of The Window 
  3122.         BOSS libraries, or explicitly specifying the correct Window BOSS 
  3123.         library as part of the link command line.  Refer to your compiler 
  3124.         documentation for further information.
  3125.  
  3126.         Fixup Offset Errors- These are always the result of attempting to 
  3127.         link code compiled under one memory model with libraries created 
  3128.         for use with another memory model.
  3129.  
  3130.         Bad Handle Exits - Both the C and assembly functions make very 
  3131.         heavy use of pointers.  The code contains numerous checks to 
  3132.         ensure that memory does not get corrupted or randomly written 
  3133.         over.  This error is normally caused by a stray pointer in the 
  3134.         application code!  Check and recheck all your pointer operations.  
  3135.         Doing strcpy's to arrays with insufficient space will always 
  3136.         cause this type of problem.
  3137.  
  3138.         Oftentimes switching from the small memory model to large memory 
  3139.         model will initially produce these errors in programs that were 
  3140.         working fine in the small model.  In nearly every case the 
  3141.         problem was traced to a stray pointer or improper pointer usage.
  3142.  
  3143.         Fatal Compilation Errors - All command line compilers should be 
  3144.         invoked with the compiler driver batch files provided as part of 
  3145.         The Window BOSS.  This insures the compiler specific compile time 
  3146.         parameters are specified correctly.  If you elect to use you own 
  3147.         method be sure to include ALL of the command line parameters that 
  3148.         are specified in the provided batch files.  
  3149.  
  3150.         Missing Files - Remember, the documentation covers two media 
  3151.         kits (Shareware and Source) and neither kit contains ALL files.  
  3152.         If you are missing files that are listed for your media kit, 
  3153.         please contact us.
  3154.  
  3155.         Linking Errors - (A) See "Unresolved Externals" above. (B) Most 
  3156.         linking errors are the result of; (1) forgetting to specify the 
  3157.         library to link, (2) specifying the wrong library, or (3) command 
  3158.         line syntax errors.  Double check your compiler documentation for 
  3159.         the proper way to link "other libraries" or "3rd party 
  3160.         libraries".
  3161.  
  3162.         Other Problems - Double check this manual for proper usage, your 
  3163.         compile documentation, then contact us.
  3164.  
  3165.  
  3166.  
  3167.                                                            Page: 51
  3168.                                                      The Window BOSS
  3169.  
  3170.  
  3171.  
  3172.         8. Making Changes
  3173.  
  3174.         Incorporating local modifications or enhancements is, in part, 
  3175.         why you acquired the source code to begin with.  Incorporating 
  3176.         your modifications or enhancements should be be a relatively 
  3177.         straight forward task provided you follow the basic guidelines 
  3178.         outlined in the subsequent sections of this manual.  
  3179.  
  3180.         If you feel you have developed a significant enhancement that is 
  3181.         both well documented and written please let us know.  We have, 
  3182.         from time to time, incorporated customer supplied enhancements to 
  3183.         our products.  Contact us for further details.
  3184.  
  3185.         8.1. General Considerations
  3186.  
  3187.         First, be sure that you are familiar with the existing 
  3188.         conventions and compiler specific feature test switches. Refer to 
  3189.         the various BATch files for specific examples of compiler 
  3190.         specific defines etc.  
  3191.  
  3192.         Please note that we assume that you have installed your compiler 
  3193.         exactly as suggested in the compiler's manual.  This includes 
  3194.         suggested sub-directories, PATH specifiers, and environment 
  3195.         setup.  Check and double check the "include" file requirements - 
  3196.         make sure you have the required files and that they have been 
  3197.         edited to correspond to the memory model you are writing code 
  3198.         for. Creating code that compiles under numerous compilers is not 
  3199.         an easy task.  If you run into problems review your compilers 
  3200.         documentation and browse through the batch files provided.  If 
  3201.         you still have problems - call!  
  3202.  
  3203.         Carefully review the area of code you wish to modify or enhance - 
  3204.         be sure to get a complete understanding of what's currently going 
  3205.         on before you add your own code.  With the exception of the ASM 
  3206.         files, compiler and memory model specific feature test switches 
  3207.         are specified on the command line. 
  3208.  
  3209.         Depending upon the compiler being used, several warning errors 
  3210.         will be generated.  Warnings created by the unmodified 
  3211.         distribution code can be safely ignored - all others should be 
  3212.         investigated.
  3213.  
  3214.         A note of caution... PC/MS-DOS Version 2.XX's LINK can complain 
  3215.         if you build a new library that takes advantage of later LINK 
  3216.         enhancements.  If this occurs, you can (1) upgrade to DOS 3.1++ 
  3217.         or, (2) get a librarian that isn't so smart!!  We suggest going 
  3218.         to the later revision of DOS.
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.                                                            Page: 52
  3229.                                                      The Window BOSS
  3230.  
  3231.  
  3232.  
  3233.         Making Changes - continued.
  3234.  
  3235.  
  3236.         8.2. Specific Changes to Consider
  3237.  
  3238.         Both the Shareware and Source versions of The Window BOSS and 
  3239.         Data Clerk are supplied with the numerous common source code 
  3240.         files.
  3241.  
  3242.         The source code was provided to serve as the basis upon which you 
  3243.         could develop your own enhancements to the product and to provide 
  3244.         you with those modules which may need to be modified for your 
  3245.         particular application.  The latter is true of wn_frmget, 
  3246.         wn_iemsg, and wn_ihmsg.  You should consider modifying these 
  3247.         routines if you want to change the way in which data entry forms 
  3248.         are handled when completed (wn_frmget), the way in which data 
  3249.         entry field help messages are displayed  (wn_ihmsg), or the way 
  3250.         in which data entry field error messages are displayed 
  3251.         (wn_iemsg).
  3252.  
  3253.         In the case of wn_frmget, the code to modify is at the tail end 
  3254.         of the file and is clearly labeled.  Data entry Help messages are 
  3255.         displayed by wn_ihmsg whenever the HELP key is depressed.  Data 
  3256.         entry error messages are displayed by wn_iemsg whenever 
  3257.         validation for a particular field fails.  Refer to the source 
  3258.         code files and the descriptions of these functions in the 
  3259.         function synopsis section of this document.
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.                                                            Page: 53
  3290.                                                      The Window BOSS
  3291.  
  3292.  
  3293.  
  3294.         Making Changes - continued.
  3295.  
  3296.  
  3297.         8.3. Making Changes - An Overview by The Numbers 
  3298.  
  3299.  
  3300.              1) If applicable, edit the assembler level modules as 
  3301.                 needed.  Be sure to set LPROG and LDATA (if they apply).  
  3302.                 ASSEMBLE.
  3303.  
  3304.              2) If Applicable, edit the "C" level modules.  COMPILE.
  3305.  
  3306.              3) Test your changes by linking the new/modified code 
  3307.                 with the existing libraries. For example to link your 
  3308.                 modified wn_move.c and v_getch:  (Microsoft example)
  3309.  
  3310.                   C> link myapp+wn_move+msvlib,,,swin
  3311.                 
  3312.                 If required, refer to your compiler documentation for 
  3313.                 explicit instructions on linking.
  3314.                                
  3315.              4) Update the existing Window BOSS libraries with the new 
  3316.                 "obj" files.  This is done with the librarian provided 
  3317.                 with your compiler.  Alternatively, you can use the batch 
  3318.                 files provided with the source code to recompile the 
  3319.                 entire library and rebuild, rather than update, The 
  3320.                 Window BOSS libraries.
  3321.  
  3322.                 If required, refer to your compiler documentation for 
  3323.                 explicit instructions on how to use their librarians to 
  3324.                 update libraries.
  3325.  
  3326.         Remember, the memory model of the assembly "obj" file must 
  3327.         correspond to the memory model of the C "obj" files and the 
  3328.         memory model of any existing libraries. 
  3329.  
  3330.         8.4. Assembly Language Object Files
  3331.  
  3332.         The Source Media Kit now includes the object files of the 
  3333.         assembly language functions used by The Window BOSS. This will 
  3334.         free you from having to acquire, or use, an assembler unless you 
  3335.         intend to make changes to those functions written in assembly 
  3336.         language!  Now, all you have to do is copy and or rename the 
  3337.         appropriate object file before running the "MAKELIB" batch file!  
  3338.         A object file matrix is provided to assist you in determining 
  3339.         which object file should be used with which compiler and memory 
  3340.         model.
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.                                                            Page: 54
  3351.                                                      The Window BOSS
  3352.  
  3353.  
  3354.  
  3355.         Making Changes - continued.
  3356.  
  3357.  
  3358.         8.5. Assembly Language Object File Matrix
  3359.  
  3360.         The matrix that follows identifies the relationship between the 
  3361.         object filename, compiler memory model, and the filename used as 
  3362.         part of the "MAKELIB" batch utility provided as part of The 
  3363.         Window BOSS.  Use this matrix to determine what file to rename 
  3364.         (or copy) when recreating Window BOSS libraries that DO NOT 
  3365.         include any changes or additions to existing assembly language 
  3366.         functions.
  3367.                        
  3368.                                Object File Matrix
  3369.  
  3370.         Compiler     SMALL     MEDIUM   COMPACT  LARGE      MAKELIB NAME
  3371.  
  3372.         QuickC 2.0   SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3373.         QuickC 2.5   SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3374.         MSC 5.X      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3375.         MSC 6.X      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3376.         Turbo C      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3377.         Watcom       SWCVLIB   MWCVLIB  CWCVLIB  LWCVLIB    WCVLIB.OBJ
  3378.         Express C    -------   MWCVLIB  -------  -------    WCVLIB.OBJ
  3379.         Datalight    SDLVLIB   PDLVLIB  DDLVLIB  LDLVLIB    DLVLIB.OBJ
  3380.         Lattice 3    SVLIB     PVLIB    DVLIB    LVLIB      VLIB.OBJ
  3381.         Lattice 6    SVLIB     PVLIB    DVLIB    LVLIB      VLIB.OBJ
  3382.         Zortech      SMSVLIB   MMSVLIB  CMSVLIB  LMSVLIB    MSVLIB.OBJ
  3383.         CI86         SVLIB     -------  -------  LVLIB      VLIB.OBJ
  3384.         MIX          -------   PCVLIB   -------  -------    PCVLIB.MIX
  3385.         AZTEC        SAZVLIB   MAZVLIB  CAZVLIB  LAZVLIB    AZVLIB.O
  3386.  
  3387.         Example: Rebuild the Large model library for Microsoft C 5.X, 
  3388.         6.X, or Quick C.  
  3389.  
  3390.         You would:
  3391.  
  3392.              (1) Use LCOMPILE to compile all C functions
  3393.  
  3394.                        C>LCOMPILE
  3395.  
  3396.              (2) Copy LMSVLIB.OBJ to MSVLIB.OBJ
  3397.  
  3398.                        C>COPY LMSVLIB.OBJ MSVLIB.OBJ
  3399.              
  3400.              (3) Rebuild the LARGE model library 
  3401.  
  3402.                        C>MAKELIB LWIN
  3403.  
  3404.         Notes:
  3405.  
  3406.              The HUGE memory model requires the same object file as the 
  3407.              LARGE.  Naturally, this only applies to those compilers that 
  3408.              support the HUGE memory model.
  3409.  
  3410.  
  3411.                                                            Page: 55
  3412.                                                      The Window BOSS
  3413.  
  3414.  
  3415.  
  3416.         Making Changes - continued.
  3417.  
  3418.  
  3419.         8.6. Assembler Code
  3420.  
  3421.           Selecting the Memory Model:
  3422.  
  3423.              Computer Innovations and Lattice
  3424.  
  3425.                 1) vlib.asm     Edit - Set LATTICE to 1 for Lattice 
  3426.                                 DOS.MAC determines the memory model.
  3427.  
  3428.                                 Set LATTICE to 0 for Computer Innovations.
  3429.                                 MODEL.H determines the memory model.
  3430.  
  3431.                 2) model.h      CI86 only - Set "SMALL" & "LARGE"
  3432.                                 See MODEL.H for discussion.
  3433.  
  3434.              Microsoft C, QuickC, Borland Turbo C, Watcom C, Zortech
  3435.  
  3436.                 1) msvlib.asm   Set LDATA & LPROG to TRUE or FALSE 
  3437.                    wcvlib.asm   LDATA is TRUE for LARGE DATA
  3438.                                 LPROG is TRUE for LARGE CODE
  3439.                                 Assemble using:
  3440.                                   MASM /MX MSVLIB;   <- All but WATCOM
  3441.                                   MASM /MX WCVLIB;   <- WATCOM ONLY
  3442.  
  3443.              Datalight
  3444.  
  3445.                 1) dos.mac      Edit to reflect memory model. 
  3446.                                 Additionally, MACROS.ASM must be present.
  3447.                                 Assemble using:
  3448.                                       MASM /MX dlvlib; 
  3449.  
  3450.              MIX Power C
  3451.  
  3452.                 1) pcvlib.asm   Set LDATA to FALSE, LPROG to TRUE
  3453.                                 Assemble using:
  3454.                                       MASM /ML PCVLIB;
  3455.  
  3456.                                 Run the MIX utility on PCVLIB.OBJ
  3457.  
  3458.              Aztec C
  3459.                   
  3460.                 1) azvlib.asm   Set LDATA & LPROG to TRUE or FALSE 
  3461.                                 LDATA is TRUE for LARGE DATA
  3462.                                 LPROG is TRUE for LARGE CODE
  3463.                                 Assemble using:
  3464.                                       AS AZVLIB;
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.                                                            Page: 56
  3473.                                                      The Window BOSS
  3474.  
  3475.  
  3476.  
  3477.         Making Changes - continued.
  3478.  
  3479.  
  3480.  
  3481.         8.7. C Code
  3482.  
  3483.         Pattern your enhancements after existing code.  The most common 
  3484.         mistakes are: (1) failing to call wn_activate, (2) failing to 
  3485.         check for error returns, and (3) failing to rebuild the libraries 
  3486.         correctly.
  3487.  
  3488.         Incorporating custom data entry functions is a straightforward 
  3489.         task if you follow the guidelines below.
  3490.  
  3491.              . Pattern your data entry routine after wn_gfloat.
  3492.  
  3493.              . Study the relationship between wn_gfloat and wn_frmget. 
  3494.  
  3495.              . Study the way in which arguments are loaded using the 
  3496.                unions v1 through v8.
  3497.  
  3498.              . Edit windows.h and expand the table of data entry function 
  3499.                codes to include a new code above 100, for example:
  3500.  
  3501.                        #define GCUSTOM  101
  3502.  
  3503.                The table of data entry function codes is located towards 
  3504.                the tail end of "windows.h" and begins with:
  3505.  
  3506.                        #define GDONE    0
  3507.  
  3508.              . Edit wn_frmget.c expanding the large case statement to 
  3509.                include a case for your custom data entry function.  
  3510.                Pattern the code you are adding after the existing code.
  3511.  
  3512.              . Rebuild the libraries adding your custom function and 
  3513.                replacing wn_frmget with the new version.
  3514.  
  3515.         Refer to wn_gfloat and wn_frmget....
  3516.  
  3517.              The general logic is to call the data entry function with 
  3518.              the argument list corresponding to this occurrence of this 
  3519.              type of field. The data entry function tests the value of 
  3520.              "fun". If it is "XEQ" then control immediately passes to the 
  3521.              logic that handles data entry.  If fun is "SET" then the 
  3522.              data entry function loads the form control block (indexed by 
  3523.              "fld") with the arguments being passed. This sets the stage 
  3524.              for subsequent calls (in a predetermined order) from 
  3525.              wn_frmget! When called, wn_frmget first displays all the 
  3526.              prompt fields, and then calls the data entry functions in 
  3527.              the order determined by the form control block.
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.                                                            Page: 57
  3534.                                                      The Window BOSS
  3535.  
  3536.  
  3537.  
  3538.         9. Library Rebuilding (MSC5.1, QC2.0, LC 3.41)
  3539.  
  3540.         Support for Microsoft C 5.1, QuickC 2.0, and Lattice 3.41 will 
  3541.         eventually cease.  At this time Star Guidance Consulting is not 
  3542.         distributing preconfigured libraries for these compilers with 
  3543.         registered versions of The Window BOSS.  We are, however, 
  3544.         providing all the tools required to rebuild the libraries on the 
  3545.         end user's machine.  We have also certified these compilers to 
  3546.         work with *this* version (see front cover of the manual) of The 
  3547.         Window BOSS. The steps to follow are outlined below.  The entire 
  3548.         process should not take more than 20 minutes.
  3549.  
  3550.              1. Unarchive CFILES.LZH  
  3551.  
  3552.                   C> lharc e cfiles
  3553.  
  3554.              2. Unarchive MS5.LZH or MSQC20.LZH or LC3.LZH
  3555.  
  3556.                   C> lharc e MS5 
  3557.                        or
  3558.                   C> lharc e MSQC20
  3559.                        or
  3560.                   C> lharc e LC3
  3561.  
  3562.              3. Based on the memory of the library you wish to create use 
  3563.                 one of the ?COMPILE.BAT batch files to compile all of the 
  3564.                 "C" files.  The first character of the batch file 
  3565.                 corresponds to the memory module you wish to create.  For 
  3566.                 example, to compile for the Large memory model you 
  3567.                 would:
  3568.  
  3569.                   C> LCOMPILE
  3570.  
  3571.             4.  Using the previously discussed "Assembly Language Object 
  3572.                 File Matrix" copy the memory model specific "obj" file to 
  3573.                 either MSVLIB.OBJ or VLIB.OBJ.  For the large memory 
  3574.                 model you would:
  3575.  
  3576.                   C> copy lmsvlib.obj msvlib.obj          (Microsoft)
  3577.                        or
  3578.                   C> copy lvlib.obj vlib.obj              (Lattice)
  3579.  
  3580.             5.  Create the library using the MAKELIB batch file. Name the 
  3581.                 library ?WIN where ? corresponds to the memory model you 
  3582.                 are creating.  For example, to build the Large library 
  3583.                 you would:
  3584.  
  3585.                   C> MAKELIB LWIN
  3586.  
  3587.         Thats all there is to it!  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.                                                            Page: 58
  3595.                                                      The Window BOSS
  3596.  
  3597.  
  3598.  
  3599.         10. Function Call Synopsis
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.                  The Window BOSS and Data Clerk Function Library
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.                                                            Page: 59
  3656.                                                      The Window BOSS
  3657.  
  3658.  
  3659.  
  3660.         10.1. wn_init -- init window system
  3661.         10.2. wn_exit -- exit window system
  3662.         10.3. wn_psinit() -- init window system - physical size
  3663.  
  3664.         USAGE
  3665.  
  3666.           wn_init()
  3667.  
  3668.           wn_psinit(rows, columns)
  3669.           int rows, columns
  3670.  
  3671.              rows = # of rows on physical screen
  3672.              cols = # of columns on physical screen
  3673.  
  3674.           wn_exit()
  3675.  
  3676.           wn_init() or wn_psinit() and wn_exit(), if used, should be the 
  3677.           first and last functions called. Both wn_init() and wn_psinit() 
  3678.           save the video state and application entry screen.  wn_init() 
  3679.           or wn_psinit() is typically the very first function called in 
  3680.           the main program. wn_exit() restores the saved video state and 
  3681.           screen image.  wn_exit() is typically called just prior to 
  3682.           calling exit().
  3683.  
  3684.           wn_init() is the general case of wn_psinit().  It assumes a 
  3685.           physical screen size of 25x80 and therefore is the most 
  3686.           portable across video adapters.
  3687.  
  3688.           wn_psinit() allows those who need to use either the EGA 43x80
  3689.           or VGA 50x80 line modes a handy way to save the existing 43 or 
  3690.           50 line screen image.  Examples:
  3691.  
  3692.              wn_psinit(43,80);             /* saves 43 line EGA screen */
  3693.              wn_psinit(50,80);             /* saves 50 line VGA screen */
  3694.           
  3695.         RETURNS
  3696.  
  3697.           TRUE if successful, FALSE if error.
  3698.  
  3699.         CAUTIONS and ADDITIONAL NOTES
  3700.  
  3701.           wn_psinit() does not check to see if the parameters passed are 
  3702.           valid for the adapter in use.
  3703.  
  3704.           wn_psinit() does not change video modes based on the parameters 
  3705.           passed.  It is the programmers responsibility to insure that 
  3706.           the video adapter is in the correct mode for the application.
  3707.  
  3708.           Calling wn_psinit() with parameters greater than can be handled 
  3709.           by the machines video adapter can have interesting but 
  3710.           undesirable results.
  3711.  
  3712.           Use of wn_psinit() should be restricted to machines equipped 
  3713.           with EGA or VGA adapters only.
  3714.  
  3715.  
  3716.                                                            Page: 60
  3717.                                                      The Window BOSS
  3718.  
  3719.  
  3720.  
  3721.         10.4. wn_dmode -- set window display mode
  3722.  
  3723.         USAGE
  3724.  
  3725.           wn_dmode(mode)
  3726.           int mode
  3727.  
  3728.                   mode = PAINT for painted windows
  3729.                   mode = FLASH for instant windows
  3730.  
  3731.           wn_dmode sets the windows display mode as per mode, PAINT style 
  3732.           windows appear to be painted (top to bottom) where FLASH style 
  3733.           windows instantly appear.
  3734.  
  3735.         RETURNS
  3736.  
  3737.           Nothing.
  3738.  
  3739.         CAUTIONS and ADDITIONAL NOTES
  3740.  
  3741.           CGA, EGA, and VGA only. Updates are made directly to video 
  3742.           memory.
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.                                                            Page: 61
  3778.                                                      The Window BOSS
  3779.  
  3780.  
  3781.  
  3782.         10.5. wn_open -- open window 
  3783.  
  3784.         USAGE
  3785.  
  3786.           wn = (WINDOWPTR)wn_open(page, row, col, width, height, atrib,
  3787.                 batrib)
  3788.           int page, row, col, width, height, atrib, batrib;
  3789.  
  3790.                 page -  0 500, 800, or 1000
  3791.                         1000 opens a borderless page
  3792.                          800 opens an exploding window
  3793.                          500 opens a window with black shadows
  3794.                            0 opens a bordered window (NORMAL)
  3795.                 row  -  row of upper left hand corner of the window
  3796.                 col  -  column of upper left hand corner of the window
  3797.                 width - INSIDE dimension (max value is 78 for a 80 column 
  3798.                         wide display, 80 if borderless)
  3799.                 height- INSIDE dimension (max value is 23 for a 25 row 
  3800.                         high display, 25 if borderless)
  3801.                 atrib - attribute to be used IN the window
  3802.                 batrib- attribute to be used for the border
  3803.  
  3804.           wn_open is usually the first function called to create and use 
  3805.           a window.  wn_open dynamically allocates memory to save the 
  3806.           area defined (by row, col, width, and height), saves the image, 
  3807.           opens the window and homes the logical cursor to row 0, col 0 
  3808.           of the window.  The window is now ready to be used by the 
  3809.           various window management routines.  
  3810.  
  3811.           Attributes (COLORS) are defined in windows.h.
  3812.  
  3813.         RETURNS
  3814.  
  3815.           wn = window handle or NULL if error (no memory and/or bad 
  3816.           parameters can cause NULL returns)
  3817.  
  3818.         CAUTIONS and ADDITIONAL NOTES
  3819.  
  3820.           Width and height are inside dimensions. If you want a NORMAL 
  3821.           window with a work area of 10 rows and 5 columns, the width is 
  3822.           7 and the height is 12.  Maximum values are linked to the 
  3823.           actual physical screen size and are dependent upon whether or 
  3824.           not a borderless window is being opened.  The window, its 
  3825.           borders (if they exist), and its shadow (if it exists) must all 
  3826.           fit and be visible on the physical screen.
  3827.           
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.                                                            Page: 62
  3839.                                                      The Window BOSS
  3840.  
  3841.  
  3842.  
  3843.         wn_open - continued.
  3844.  
  3845.  
  3846.  
  3847.           The flashing cursor will not be displayed unless wn_sync() has 
  3848.           been called with a value of TRUE.  
  3849.  
  3850.           The window "wn" automatically becomes the top window tile upon 
  3851.           return.
  3852.  
  3853.           Exploding windows are linked to the time of day clock.  This is 
  3854.           done by reading the time of day (in ticks) directly from low 
  3855.           memory.  If you would like to vary the explosion time it can be 
  3856.           done by calling the internal routine "wns_stdiv" with a long 
  3857.           integer constant in the range of 1 to 10.  The default value is 
  3858.           5L.  Increasing the value will cause the explosion to be 
  3859.           faster.  For example:
  3860.  
  3861.                                  wns_stdiv(10L);
  3862.  
  3863.           Window types can not be combined.  That is to say that you can 
  3864.           not have shadowed borderless windows, borderless exploding 
  3865.           windows, or exploding windows with shadows.
  3866.  
  3867.         See Also - wn_psinit and wn_init
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.                                                            Page: 63
  3900.                                                      The Window BOSS
  3901.  
  3902.  
  3903.  
  3904.         10.6. wn_title -- title window
  3905.  
  3906.         USAGE
  3907.  
  3908.           wn_title(wn,title)
  3909.           WINDOWPTR wn;
  3910.           char *title;
  3911.  
  3912.                 wn    - window handle
  3913.                 title - string pointer to title
  3914.  
  3915.           The title is displayed on the top border of the window using 
  3916.           the currently defined border attribute.  The cursor is 
  3917.           positioned off the screen after the title is written.  
  3918.  
  3919.         RETURNS
  3920.  
  3921.           TRUE if all is well, NULL if the title is to large to fit on 
  3922.           the top border or error.
  3923.  
  3924.         CAUTIONS and ADDITIONAL NOTES
  3925.  
  3926.           The window "wn" automatically becomes the top window tile upon 
  3927.           return.
  3928.  
  3929.  
  3930.  
  3931.         10.7. wn_titla -- title window with attribute
  3932.  
  3933.         USAGE
  3934.  
  3935.           wn_titla(wn,title,atrib)
  3936.           WINDOWPTR wn;
  3937.           char *title;
  3938.           int atrib;
  3939.  
  3940.                 wn    - window handle
  3941.                 title - string pointer to title
  3942.                 atrib - attribute to use for text
  3943.  
  3944.           The title is displayed on the top border of the window using 
  3945.           the attribute specified by atrib.  The cursor is positioned off 
  3946.           the screen after the title is written.  
  3947.  
  3948.         RETURNS
  3949.  
  3950.           TRUE if all is well, NULL if the title is to large to fit on 
  3951.           the top border or error.
  3952.  
  3953.         CAUTIONS and ADDITIONAL NOTES
  3954.  
  3955.           The window "wn" automatically becomes the top window tile upon 
  3956.           return.
  3957.  
  3958.  
  3959.  
  3960.                                                            Page: 64
  3961.                                                      The Window BOSS
  3962.  
  3963.  
  3964.  
  3965.         10.8. wn_stitle -- super title window
  3966.  
  3967.         USAGE
  3968.  
  3969.           wn_title(wn,title,location)
  3970.           WINDOWPTR wn;
  3971.           char *title;
  3972.           int location;
  3973.  
  3974.                 wn    -    window handle
  3975.                 title -    string pointer to title
  3976.                 location - border location
  3977.  
  3978.             Location can be any of the following (defined in windows.h):
  3979.  
  3980.                 WNTOPR  - top right 
  3981.                 WNTOPL  - top left 
  3982.                 WNTOPC  - top center 
  3983.                 WNBOTR  - bottom right 
  3984.                 WNBOTL  - bottom left 
  3985.                 WNBOTC  - bottom center 
  3986.  
  3987.           The title is displayed on the border at the location specified 
  3988.           using the currently defined border attribute.  The cursor is 
  3989.           positioned off the screen after the title is written.  
  3990.  
  3991.         RETURNS
  3992.  
  3993.           TRUE if all is well, NULL if the title is to large to fit on 
  3994.           the border.
  3995.  
  3996.         CAUTIONS and ADDITIONAL NOTES
  3997.  
  3998.           The window "wn" automatically becomes the top window tile upon 
  3999.           return.
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.                                                            Page: 65
  4022.                                                      The Window BOSS
  4023.  
  4024.  
  4025.  
  4026.         10.9. wn_stitla -- super title window with attribute
  4027.  
  4028.         USAGE
  4029.  
  4030.           wn_stitla(wn,title,atrib,location)
  4031.           WINDOWPTR wn;
  4032.           char *title;
  4033.           int atrib;
  4034.           int location;
  4035.  
  4036.                 wn    - window handle
  4037.                 title - string pointer to title
  4038.                 atrib - attribute to use for text
  4039.                 location - border location
  4040.  
  4041.             Location can be any of the following (defined in windows.h):
  4042.  
  4043.                 WNTOPR  - top right 
  4044.                 WNTOPL  - top left 
  4045.                 WNTOPC  - top center 
  4046.                 WNBOTR  - bottom right 
  4047.                 WNBOTL  - bottom left 
  4048.                 WNBOTC  - bottom center 
  4049.  
  4050.  
  4051.           The title is displayed on the border at the location specified 
  4052.           using the using the attribute specified by atrib.  The cursor 
  4053.           is positioned off the screen after the title is written.  
  4054.  
  4055.         RETURNS
  4056.  
  4057.           TRUE if all is well, NULL if the title is to large to fit on 
  4058.           the border.
  4059.  
  4060.         CAUTIONS and ADDITIONAL NOTES
  4061.  
  4062.           The window "wn" automatically becomes the top window tile upon 
  4063.           return.
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.                                                            Page: 66
  4083.                                                      The Window BOSS
  4084.  
  4085.  
  4086.  
  4087.         10.10. wn_close -- close window
  4088.  
  4089.         USAGE
  4090.  
  4091.           wn_close(wn) 
  4092.           WINDOWPTR wn; 
  4093.  
  4094.                 wn - handle of a previously opened window.
  4095.  
  4096.           wn_close removes the window specified by wn and restores the 
  4097.           screen area under the window to its previous contents.  The 
  4098.           memory allocated by wn_open is returned to the free list.  The 
  4099.           cursor is positioned to where it was located prior to the 
  4100.           wn_open call.  
  4101.  
  4102.         RETURNS 
  4103.  
  4104.           TRUE or NULL if error
  4105.  
  4106.         CAUTIONS and ADDITIONAL NOTES 
  4107.  
  4108.           None.
  4109.  
  4110.  
  4111.  
  4112.         10.11. wn_save -- save screen image 
  4113.  
  4114.         USAGE
  4115.  
  4116.           wn = (WINDOWPTR)wn_save(page, row, col, width, height)
  4117.           int page, row, col, width, height;
  4118.  
  4119.                 page -  always 0.
  4120.                 row  -  row of upper left hand corner of the window
  4121.                 col  -  column of upper left hand corner of the window
  4122.                 width - INSIDE dimension (max value is 78)
  4123.                 height- INSIDE dimension (max value is 23)
  4124.  
  4125.           wn_save can be used to save areas of the screen for purposes 
  4126.           other than windows.  
  4127.  
  4128.           Memory for the screen image is dynamically allocated.
  4129.  
  4130.         RETURNS
  4131.  
  4132.           wn = window handle or NULL if error
  4133.  
  4134.         CAUTIONS and ADDITIONAL NOTES
  4135.  
  4136.           The window handle returned by wn_save should only be used with 
  4137.           wn_restore. Use with other routines could produce unpredictable 
  4138.           results.
  4139.  
  4140.  
  4141.  
  4142.  
  4143.                                                            Page: 67
  4144.                                                      The Window BOSS
  4145.  
  4146.  
  4147.  
  4148.         10.12. wn_restore -- restore saved screen image
  4149.  
  4150.         USAGE
  4151.  
  4152.           wn_restore(wn)
  4153.           WINDOWPTR wn;
  4154.  
  4155.                 wn - handle of previously wn_save(ed) window.
  4156.  
  4157.           Restores the screen image corresponding to the window handle 
  4158.           wn, and allocated memory is returned to the free list.
  4159.  
  4160.         RETURNS
  4161.  
  4162.           TRUE or NULL if error
  4163.  
  4164.         CAUTIONS and ADDITIONAL NOTES
  4165.  
  4166.           This function should only be used with window handles obtained 
  4167.           from wn_save.
  4168.  
  4169.  
  4170.  
  4171.         10.13. wn_move -- move window
  4172.  
  4173.         USAGE
  4174.  
  4175.           wn = (WINDOWPTR)wn_move(wn,row,col)
  4176.  
  4177.                 wn -  handle of window to be moved
  4178.                 row - destination row
  4179.                 col - destination column
  4180.  
  4181.           Moves the window corresponding to wn to a new location.  The 
  4182.           cursor is positioned off the screen after the call.  
  4183.  
  4184.         RETURNS
  4185.  
  4186.           Window handle of the window moved or NULL if error.
  4187.  
  4188.         CAUTIONS and ADDITIONAL NOTES
  4189.  
  4190.           The window "wn" automatically becomes the top window tile upon 
  4191.           return.
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.                                                            Page: 68
  4205.                                                      The Window BOSS
  4206.  
  4207.  
  4208.  
  4209.         10.14. wn_locate -- locate cursor in window
  4210.  
  4211.         USAGE
  4212.  
  4213.           wn_locate(wn, row, col)
  4214.           WINDOWPTR wn;
  4215.           int row, col;
  4216.  
  4217.                 wn  - window handle
  4218.                 row - row to position to (relative to window origin)
  4219.                 col - column to position to (relative to window origin)
  4220.  
  4221.           Position the cursor to the row and column specified.  Row and  
  4222.           Column values are relative to the origin of the window (0,0 
  4223.           locates the cursor in the upper left hand corner of the window 
  4224.           referenced by wn).
  4225.  
  4226.         RETURNS
  4227.  
  4228.           TRUE or NULL if error
  4229.  
  4230.         CAUTIONS and ADDITIONAL NOTES
  4231.  
  4232.           Values of row & col are not checked.
  4233.  
  4234.           The window "wn" automatically becomes the top window tile upon 
  4235.           return.
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.                                                            Page: 69
  4266.                                                      The Window BOSS
  4267.  
  4268.  
  4269.  
  4270.         10.15. wn_printf -- window printf
  4271.  
  4272.         USAGE
  4273.  
  4274.           wn_printf(wn, cs, args)
  4275.           WINDOWPTR wn;
  4276.           char *cs;
  4277.           ?? arg1 ... argn;
  4278.  
  4279.                 wn   - window handle
  4280.                 cs   - format control string
  4281.                 args - argument list
  4282.  
  4283.           printf function for windows!
  4284.  
  4285.         RETURNS
  4286.  
  4287.           TRUE or NULL if error
  4288.  
  4289.         CAUTIONS and ADDITIONAL NOTES
  4290.  
  4291.           Output string length is limited to 254 bytes.
  4292.  
  4293.           Registered users can edit the wn_printf function and set the 
  4294.           limit to whatever they wish.
  4295.  
  4296.           Integer only for Microsoft 3.0 and Aztec.  This limitation 
  4297.           be overcome by using sprintf in conjunction with wn_printf.  
  4298.           For example:
  4299.  
  4300.                   char buf[256];
  4301.                        ..
  4302.                        ..
  4303.                   sprintf(buf,"%d %l %x\n", intval, longval, hexval);
  4304.                   wn_printf(wn, buf);
  4305.  
  4306.           Full support for all others.  
  4307.  
  4308.           The window "wn" automatically becomes the top window tile upon 
  4309.           return.
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.                                                            Page: 70
  4327.                                                      The Window BOSS
  4328.  
  4329.  
  4330.  
  4331.         10.16. wn_puts -- put string (high speed)
  4332.         10.17. wn_putc -- put character 
  4333.  
  4334.         USAGE
  4335.  
  4336.           wn_puts(wn, row, col, string)
  4337.           WINDOWPTR wn;
  4338.           int row, col;
  4339.           char *string;
  4340.  
  4341.           wn_putc(wn, row, col, c)
  4342.           WINDOWPTR wn;
  4343.           int row, col;
  4344.           char c;
  4345.              
  4346.                 wn -    window handle
  4347.                 row -   row to print the string at
  4348.                 col -   column to print the string at
  4349.                 string- the string to print
  4350.                 c -     the character to print
  4351.  
  4352.           Row and Col are relative to the origin of the window.
  4353.  
  4354.           The cursor is displayed only if wn_synflg has been called with 
  4355.           a value of TRUE.
  4356.  
  4357.         RETURNS
  4358.  
  4359.           TRUE or NULL if error
  4360.  
  4361.         CAUTIONS and ADDITIONAL NOTES
  4362.  
  4363.           wn_puts writes the string directly to the video ram. Tabs, line 
  4364.           feeds, carriage returns and other control characters are not 
  4365.           filtered or processed in any way.
  4366.  
  4367.           Range checks are not performed to insure the specified string 
  4368.           can be contained in the window.  
  4369.  
  4370.           The window "wn" automatically becomes the top window tile upon 
  4371.           return.
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.                                                            Page: 71
  4388.                                                      The Window BOSS
  4389.  
  4390.  
  4391.  
  4392.         10.18. wn_gets -- get string with validation
  4393.  
  4394.         USAGE
  4395.  
  4396.           (char *) wn_gets(wn, buf, va, uva)
  4397.           WINDOWPTR wn;
  4398.           char *buf;
  4399.           int va;
  4400.           char *uva;
  4401.  
  4402.                 wn -    window handle
  4403.                 buf -   user buffer for string
  4404.                 va -    input validation to be used
  4405.                 uva -   user validation list [optional]
  4406.  
  4407.           va specifies the type of input validation to be performed as 
  4408.           data is being entered. Options are:
  4409.  
  4410.                 (1) none                no restrictions - accept everything
  4411.                 (2) integer             accept: 0 thru 9 + -
  4412.                 (3) floating point      accept: 0 thru 9 + - .
  4413.                 (4) alpha only          accept: a thru z 
  4414.                                         (upper & lower case)
  4415.                 (5) upper case only     accept: A thru Z 
  4416.                 (6) validation list     accept: only those characters
  4417.                     (optional)                  specified via uva string.
  4418.  
  4419.                 ORing va with 0x8000 disables data entry character echo.
  4420.  
  4421.           The following editing functions are supported:
  4422.  
  4423.                 . backspace & rubout do the logical things
  4424.                 . ^U, ^X, and ^C wipe the field clean
  4425.                 . Return and Esc end the input function 
  4426.  
  4427.           Data entry takes place at the current logical cursor location. 
  4428.           You  can, of course, position the cursor to where you wish 
  4429.           prior to calling wn_gets.
  4430.  
  4431.           Example:
  4432.  
  4433.                 wn_printf(wn,"Enter your name > ");
  4434.                 wn_gets(wn,buf,4,0);
  4435.  
  4436.         RETURNS
  4437.  
  4438.           Pointer to buf or NULL if error
  4439.  
  4440.         CAUTIONS and ADDITIONAL NOTES
  4441.  
  4442.           The window "wn" automatically becomes the top window tile upon   
  4443.           return.  This function is provided for historical purposes, 
  4444.           more complete and flexible functions are included as part of 
  4445.           the Data Clerk.
  4446.  
  4447.  
  4448.                                                            Page: 72
  4449.                                                      The Window BOSS
  4450.  
  4451.  
  4452.  
  4453.         10.19. wn_putsa -- put string and attribute (high speed)
  4454.         10.20. wn_putca -- put character and attribute
  4455.  
  4456.         USAGE
  4457.  
  4458.           wn_putsa(wn, row, col, string, atrib)
  4459.           WINDOWPTR wn;
  4460.           int row, col;
  4461.           char *string;
  4462.           int atrib;
  4463.  
  4464.           wn_putca(wn, row, col, c, atrib)
  4465.           WINDOWPTR wn;
  4466.           int row, col;
  4467.           char c;
  4468.           int atrib;
  4469.  
  4470.                 wn -    window handle
  4471.                 row -   row to print the string at
  4472.                 col -   column to print the string at
  4473.                 string- the string to print
  4474.                 c -     the character to print
  4475.                 atrib - attribute to be used with string
  4476.  
  4477.           Row and Col are relative to the origin of the window.
  4478.  
  4479.           The cursor is displayed only if wn_synflg has been called with 
  4480.           a value of TRUE.
  4481.  
  4482.         RETURNS
  4483.  
  4484.           TRUE or NULL if error
  4485.  
  4486.         CAUTIONS and ADDITIONAL NOTES
  4487.  
  4488.           wn_puts writes the string directly to the video ram. Tabs, line 
  4489.           feeds, carriage returns and other control characters are not 
  4490.           filtered or processed in any way.
  4491.  
  4492.           Range checks are not performed to insure the specified string 
  4493.           can be contained in the window.  
  4494.  
  4495.           The window "wn" automatically becomes the top window tile upon 
  4496.           return.
  4497.  
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.  
  4509.                                                            Page: 73
  4510.                                                      The Window BOSS
  4511.  
  4512.  
  4513.  
  4514.         10.21. wn_insrow -- insert row in window
  4515.  
  4516.         USAGE
  4517.  
  4518.           wn_insrow(wn, row)
  4519.           WINDOWPTR wn;
  4520.           int row;
  4521.  
  4522.                 wn -  window handle
  4523.                 row - row at which a line is to be inserted
  4524.  
  4525.           Row is relative to the origin of the window.  All lines below 
  4526.           the row specified are scrolled down.  The currently defined 
  4527.           window attribute is used to clear the lines inserted.  
  4528.  
  4529.         RETURNS
  4530.  
  4531.           TRUE or NULL if error
  4532.  
  4533.         CAUTIONS and ADDITIONAL NOTES
  4534.  
  4535.           The window "wn" automatically becomes the top window tile upon 
  4536.           return.
  4537.  
  4538.  
  4539.  
  4540.         10.22. wn_delrow -- delete row from window
  4541.  
  4542.         USAGE
  4543.  
  4544.           wn_delrow(wn, row)
  4545.           WINDOWPTR wn;
  4546.           int row;
  4547.  
  4548.                 wn -  window handle
  4549.                 row - row at which a line is to be deleted
  4550.  
  4551.           Row is relative to the origin of the window.  All lines below 
  4552.           the row specified are scrolled up. The currently defined window 
  4553.           attribute is used to clear the lines inserted.  
  4554.  
  4555.         RETURNS
  4556.  
  4557.           TRUE or NULL if error
  4558.  
  4559.         CAUTIONS and ADDITIONAL NOTES
  4560.  
  4561.           The window "wn" automatically becomes the top window tile upon 
  4562.           return.
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.                                                            Page: 74
  4571.                                                      The Window BOSS
  4572.  
  4573.  
  4574.  
  4575.         10.23. wn_clr -- clear window
  4576.  
  4577.         USAGE
  4578.  
  4579.           wn_clr(wn)
  4580.           WINDOWPTR wn;
  4581.  
  4582.                 wn - window handle
  4583.  
  4584.           The window corresponding to wn is cleared (mini clear screen).  
  4585.           The currently defined window attribute is used to clear the 
  4586.           interior of the window.  
  4587.  
  4588.           The windows virtual cursor is homed.
  4589.  
  4590.         RETURNS
  4591.  
  4592.           TRUE or NULL if error
  4593.  
  4594.         CAUTIONS and ADDITIONAL NOTES
  4595.  
  4596.           The window "wn" automatically becomes the top window tile upon 
  4597.           return.
  4598.  
  4599.  
  4600.  
  4601.         10.24. wn_activate -- activate window
  4602.  
  4603.         USAGE
  4604.  
  4605.           wn_activate(wn)
  4606.           WINDOWPTR wn;
  4607.  
  4608.              wn - window handle
  4609.  
  4610.           Activate a previously opened window.  The window specified by 
  4611.           "wn" becomes the top window tile.
  4612.  
  4613.         RETURNS
  4614.  
  4615.           TRUE or NULL if error
  4616.  
  4617.         CAUTIONS and ADDITIONAL NOTES
  4618.  
  4619.           None.
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.  
  4628.  
  4629.  
  4630.  
  4631.                                                            Page: 75
  4632.                                                      The Window BOSS
  4633.  
  4634.  
  4635.  
  4636.         10.25. wn_color -- set window & border attribute
  4637.  
  4638.         USAGE
  4639.  
  4640.           wn_color(wn, atrib, batrib)
  4641.           WINDOWPTR wn;
  4642.           unsigned int atrib, batrib;
  4643.  
  4644.                 wn -    window handle
  4645.                 atrib - attribute to be used for the window
  4646.                 batrib- attribute to be used for the border
  4647.  
  4648.           wn_color sets the attribute to be used for all subsequent 
  4649.           operations in the window.  The attribute byte contains the 
  4650.           background specific data in the upper 4 bits and the foreground 
  4651.           specific data in the lower 4 bits.  Color and bit definitions 
  4652.           can be found in windows.h. You can use a statement of the form:
  4653.  
  4654.                          atrib = (bground << 4 | fground);
  4655.  
  4656.           to set the attribute to the correct format.  
  4657.  
  4658.           Attributes are defined in windows.h.
  4659.  
  4660.         RETURNS
  4661.  
  4662.           Nothing.
  4663.  
  4664.         CAUTIONS and ADDITIONAL NOTES
  4665.  
  4666.           None.
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.                                                            Page: 76
  4693.                                                      The Window BOSS
  4694.  
  4695.  
  4696.  
  4697.         10.26. wn_wrap -- set/clear line wrap flag
  4698.  
  4699.         USAGE
  4700.  
  4701.           wn_wrap(wn, flag) 
  4702.           WINDOWPTR wn;     
  4703.           int flag;
  4704.  
  4705.                 wn -   window handle
  4706.                 flag - wrap flag (TRUE or FALSE)
  4707.  
  4708.           Sets the line wrap flag for window functions.  If line wrap is 
  4709.           true, output that exceeds the width of a window is 
  4710.           automatically placed on the next line.  When the line wrap flag 
  4711.           is false, output that exceeds the width of the window is lost.  
  4712.  
  4713.         RETURNS
  4714.  
  4715.           Nothing.
  4716.  
  4717.         CAUTIONS and ADDITIONAL NOTES
  4718.  
  4719.           None.
  4720.  
  4721.  
  4722.  
  4723.         10.27. wn_sync -- set/clear cursor synchronization flag
  4724.  
  4725.         USAGE
  4726.  
  4727.           wn_sync(wn, flag) 
  4728.           WINDOWPTR wn;     
  4729.           int flag;
  4730.  
  4731.                 wn -   window handle
  4732.                 flag - synchronization flag (TRUE or FALSE)
  4733.  
  4734.           When wn_sync is called with a value of TRUE all subsequent text 
  4735.           output to the window will have a flashing (normal) cursor 
  4736.           displayed following the last character output. Calling wn_sync 
  4737.           with a value of false inhibits the cursor from physically 
  4738.           advancing (it is always logically advanced).  
  4739.  
  4740.         RETURNS
  4741.  
  4742.           Nothing.
  4743.  
  4744.         CAUTIONS and ADDITIONAL NOTES
  4745.  
  4746.           None.
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.                                                            Page: 77
  4754.                                                      The Window BOSS
  4755.  
  4756.  
  4757.  
  4758.         10.28. wn_scroll -- set scrolling method for window
  4759.  
  4760.         USAGE
  4761.  
  4762.           wn_scroll(wn,method)
  4763.           WINDOWPTR wn;
  4764.           int method;
  4765.  
  4766.                   wn -      window handle.
  4767.                   method -  BIOS or DMAS
  4768.  
  4769.            Set the method to be used to scroll the contents of the window 
  4770.            to use either the ROM BIOS (BIOS), or the flicker free DMA 
  4771.            logic.  BIOS and DMAS are defined in "windows.h".  
  4772.  
  4773.            The default scrolling mode is DMAS.
  4774.  
  4775.            The Window BOSS incorporates machine independent logic that 
  4776.            ensures that scrolling on color systems is performed in such a 
  4777.            way as to totally eliminate snow and flicker.  This logic, 
  4778.            although bulletproof, can slow scrolling down.  Setting the 
  4779.            scrolling method to BIOS provides a machine independent way to 
  4780.            improve the scrolling speed with a (perhaps) proportional 
  4781.            increase in flicker.  Keep in mind that recent developments in 
  4782.            CGA and EGA technology have, for the most part, eliminated 
  4783.            scrolling flicker at the hardware level.  If your system is 
  4784.            equipped with one of these boards, you may achieve a 
  4785.            noticeable improvement in scrolling speed by using wn_scroll() 
  4786.            to set the scrolling method to BIOS.  Additionally, there are 
  4787.            several console device drivers (FANSI and NANSI to mention 
  4788.            two) that "patch" the BIOS routines to achieve the same 
  4789.            result.  
  4790.  
  4791.            Setting the scrolling method to BIOS when wn_dmaflg=FALSE has 
  4792.            no effect.
  4793.  
  4794.         RETURNS
  4795.  
  4796.            Nothing.
  4797.  
  4798.         CAUTIONS and ADDITIONAL NOTES
  4799.  
  4800.            Color systems only.
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.                                                            Page: 78
  4815.                                                      The Window BOSS
  4816.  
  4817.  
  4818.  
  4819.         10.29. wn_dma -- set/clear write RAM directly flag
  4820.  
  4821.         USAGE
  4822.  
  4823.           wn_dma(flag)      
  4824.           int flag;         
  4825.  
  4826.                 flag - write to video RAM flag (TRUE or FALSE).
  4827.  
  4828.           The windowing routines assume that your video card supports 
  4829.           direct access to the video RAM (normal for monochrome 
  4830.           monitors).  
  4831.  
  4832.         RETURNS
  4833.  
  4834.           Nothing.
  4835.  
  4836.         CAUTIONS and ADDITIONAL NOTES
  4837.  
  4838.           None.
  4839.  
  4840.  
  4841.  
  4842.         10.30. wn_fixcsr -- update window cursor position
  4843.  
  4844.         USAGE
  4845.  
  4846.           wn_fixcsr(wn)     
  4847.           WINDOWPTR wn;     
  4848.  
  4849.                 wn - window handle
  4850.  
  4851.           wn_fixcsr is a companion routine to wn_sync.  Causes the 
  4852.           physical cursor to be placed at the logical cursor location.  
  4853.           It is typically called after wn_sync has been called to disable 
  4854.           cursor synchronization.  wn_fixcsr does not alter the state of 
  4855.           the windows cursor synchronization flag.  
  4856.  
  4857.         RETURNS
  4858.  
  4859.           TRUE or NULL if error
  4860.  
  4861.         CAUTIONS and ADDITIONAL NOTES
  4862.  
  4863.           The window "wn" automatically becomes the top window tile upon 
  4864.           return.
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.                                                            Page: 79
  4876.                                                      The Window BOSS
  4877.  
  4878.  
  4879.  
  4880.         10.31. wn_boxset -- set box drawing character set
  4881.  
  4882.         USAGE
  4883.  
  4884.           wn_boxset(ul, ur, tb, sd, ll, lr);
  4885.           int ul, ur, tb, sd, ll, lr;
  4886.  
  4887.             ul - upper left corner character
  4888.             ur - upper right corner character
  4889.             tb - top/bottom line character
  4890.             sd - left/right side character
  4891.             ll - lower left corner character
  4892.             lr - lower right corner character
  4893.  
  4894.           wn_boxset set the characters to be used to frame all future 
  4895.           windows.
  4896.  
  4897.         RETURNS
  4898.  
  4899.           Nothing.
  4900.  
  4901.         CAUTIONS and ADDITIONAL NOTES
  4902.  
  4903.           None.
  4904.  
  4905.  
  4906.  
  4907.         10.32. wn_natrib -- set new attribute in window NOW!
  4908.  
  4909.         USAGE
  4910.  
  4911.           wn_natrib(wn,atrib)
  4912.           WINDOWPTR wn;
  4913.           int atrib;
  4914.  
  4915.             wn    - window handle
  4916.             atrib - attribute to set the window specified by wn to.  
  4917.  
  4918.           The attributes of the window are changed immediately.
  4919.  
  4920.           Attributes are defined in window.h
  4921.  
  4922.           The border is not altered.
  4923.  
  4924.         RETURNS
  4925.  
  4926.           TRUE or NULL if error
  4927.  
  4928.         CAUTIONS and ADDITIONAL NOTES
  4929.  
  4930.           The window "wn" automatically becomes the top window tile upon 
  4931.           return.
  4932.  
  4933.  
  4934.  
  4935.  
  4936.                                                            Page: 80
  4937.                                                      The Window BOSS
  4938.  
  4939.  
  4940.  
  4941.         10.33. wn_dborder -- draw (replace) border on window
  4942.  
  4943.         USAGE
  4944.  
  4945.           wn_dborder(wn, ul, ur, tb, sd, ll, lr);
  4946.           WINDOWPTR wn;
  4947.           int ul, ur, tb, sd, ll, lr;
  4948.  
  4949.             wn - window handle
  4950.             ul - upper left corner character
  4951.             ur - upper right corner character
  4952.             tb - top/bottom line character
  4953.             sd - left/right side character
  4954.             ll - lower left corner character
  4955.             lr - lower right corner character
  4956.  
  4957.           The currently defined border attribute is used when drawing the 
  4958.           border.
  4959.  
  4960.         RETURNS
  4961.  
  4962.           TRUE or NULL if error
  4963.  
  4964.         CAUTIONS and ADDITIONAL NOTES
  4965.  
  4966.           The window "wn" automatically becomes the top window tile upon 
  4967.           return.
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.                                                            Page: 81
  4998.                                                      The Window BOSS
  4999.  
  5000.  
  5001.  
  5002.         10.34. wn_input -- general purpose window input
  5003.  
  5004.         USAGE
  5005.  
  5006.           wn_input(wn, row, col, prmpt, mask, fill, atrib, ubuff,hlpmsg)
  5007.           
  5008.              (WINDOWPTR) wn  - window pointer
  5009.              int        row  - row in window where prompt is displayed
  5010.              int        col  - col in window where prompt is displayed
  5011.              char *    prmpt - field prompt 
  5012.              char *    mask  - data entry mask
  5013.              char      fill  - fill character
  5014.              unsigned  atrib - attributes to be used 
  5015.                                (fground<<4 | background)
  5016.              char *    ubuff - user text buffer of MAXSTR size
  5017.              char *    hlpmsg- user help message - displayed
  5018.                                when HELP is pressed.  F1 is the default 
  5019.                                HELP key.  This can be changed by calling 
  5020.                                the wn_shkey() function.
  5021.             
  5022.              wn_input is the Data Clerk's kernel. It is called by  
  5023.              virtually all the higher level data entry functions.
  5024.           
  5025.         RETURNS:
  5026.           
  5027.              NULL if error, else non zero value (ASCII value of last 
  5028.              valid exit key).
  5029.  
  5030.              Sets the global "wns_escape" to TRUE if the ESCape key was 
  5031.              pressed causing wn_input to terminate. Set to FALSE 
  5032.              otherwise.
  5033.           
  5034.         CAUTIONS and ADDITIONAL NOTES:
  5035.           
  5036.              prmpt - If a prompt message is not to be provided, wn_input 
  5037.                      should be called with NSTR (null string) in  the 
  5038.                      place of the prompt message text pointer, for 
  5039.                      example:
  5040.           
  5041.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,hlpmsg)
  5042.                                           +--+
  5043.                      #defined in windows.h --^
  5044.           
  5045.                      The prompt is displayed with the current window 
  5046.                      attributes at the row and column specified in the 
  5047.                      call. Data entry begins immediately after the 
  5048.                      prompt.
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.                                                            Page: 82
  5059.                                                      The Window BOSS
  5060.  
  5061.  
  5062.  
  5063.         wn_input -- continued.
  5064.  
  5065.  
  5066.  
  5067.              mask -  The mask determines what type of data may be entered 
  5068.                      on a character by character basis.  The control 
  5069.                      characters are as follows:
  5070.           
  5071.                       # - Number (0 thru 9, -, +)
  5072.                       a - Any ASCII character 
  5073.                           (0x01 thru 0xff excluding 0x08)
  5074.                       x - Same as 'a', but without echo (password)
  5075.                       t - Any printable ASCII char (' ' thru '~')
  5076.                       l - lower case character (a thru z)
  5077.                       u - upper case character (A thru Z)
  5078.                       Mask Examples:
  5079.           
  5080.                        Date Mask           "##/##/##"
  5081.                        Time Mask           "##:##:##"
  5082.                        Integer Mask        "#######"
  5083.                        Float Mask          "FFFF.FF"
  5084.                        Phone Number        "(###) ###-####"
  5085.                        Upper Case Mask     "uuuuu" or "UUUUU"
  5086.                        Lower Case Mask     "lllll" or "LLLLL"
  5087.                        ASCII Mask          "aaaaa" or "AAAAA"
  5088.                        No Echo ASCII       "xxxxx" or "XXXXX"
  5089.                        Text Mask           "ttttt" or "TTTTT"
  5090.           
  5091.              fill -  The character to be used to fill the field where 
  5092.                      mask characters appear.  The typical choice for fill 
  5093.                      char is '_'.
  5094.           
  5095.              help  - If a HELP message is not to be provided, wn_input 
  5096.                      should be called with NSTR (null string) in the 
  5097.                      place of the help message text pointer, for example:
  5098.           
  5099.                       wn_input(wn,row,col,NSTR,mask,fill,atrib,ubuff,NSTR)
  5100.                                                                      +--+
  5101.                                                #defined in windows.h --^
  5102.                     
  5103.                      wn_ihmsg is called to display this message whenever 
  5104.                      the HELP key is depressed while the cursor is in the 
  5105.                      field.  F1 is the default HELP key.  This can be 
  5106.                      changed by calling the wn_shkey() function.
  5107.           
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.                                                            Page: 83
  5120.                                                      The Window BOSS
  5121.  
  5122.  
  5123.  
  5124.         wn_input -- continued.
  5125.  
  5126.  
  5127.  
  5128.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5129.                      the data as it is entered.  Typical size is the 
  5130.                      length of the mask + 2 bytes (strlen(mask)+2). 
  5131.                      Maximum length is MAXSTR.
  5132.           
  5133.                      On entry the first byte of ubuff should be a null, 
  5134.                      otherwise wn_input assumes there is valid data there 
  5135.                      and will enter edit mode.  This can be handy if 
  5136.                      there is a need for prefilled, but editable fields.  
  5137.                      In actual practice, wn_input uses this buffer for 
  5138.                      both initial character data entry and subsequent 
  5139.                      editing.
  5140.           
  5141.                      On return, ubuff contains the actual data entered in 
  5142.                      character format with fill and mask characters as 
  5143.                      spaces (e.g. "Now is the time          "). 
  5144.  
  5145.                      ubuff is returned left justified for non numeric 
  5146.                      masks.  If a completely numeric mask (#) was 
  5147.                      specified and the mask does not contain any other 
  5148.                      characters, ubuff is returned right justified.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.                                                            Page: 84
  5181.                                                      The Window BOSS
  5182.  
  5183.  
  5184.  
  5185.         wn_input -- continued.
  5186.  
  5187.  
  5188.  
  5189.              Editing Keys
  5190.  
  5191.                      Pressing the ESCape, RETURN/ENTER, UARROW, or DARROW 
  5192.                      key terminates input.  Since wn_input can be called 
  5193.                      alone, or from any of the custom data entry routines 
  5194.                      wn_gint, (wn_gfloat via wn_frmget), etc., wn_input 
  5195.                      must be able to exit in a variety of ways. If 
  5196.                      wn_input has been called as the result of a call to 
  5197.                      wn_frmget, the UARROW and DARROW keys move to the 
  5198.                      previous and next fields respectively.  The global 
  5199.                      wns_escape is set to TRUE if the ESCape key caused 
  5200.                      wn_input to terminate (set to FALSE otherwise).
  5201.  
  5202.                      Backspace and the cursor RIGHT ARROW and LEFT ARROW 
  5203.                      can be used to position the cursor during entry. The 
  5204.                      space bar can also be pressed when entering numeric 
  5205.                      fields provided that no "digits", "+", or "-" has 
  5206.                      been struck. Naturally, the HOME and END key work in 
  5207.                      a predictable fashion as do the INSert and DELete 
  5208.                      keys. The HOME key positions the cursor at the start 
  5209.                      of the field, END to end of the field.  The INSert 
  5210.                      key inserts a space at the current cursor position 
  5211.                      (pushing the contents of the field to the right.  
  5212.                      DELete deletes the character at the cursor location 
  5213.                      (dragging the contents of the field to the left).
  5214.           
  5215.                      When the field fills and RETURN/ENTER has not been 
  5216.                      struck, the cursor waits at the end of the field for 
  5217.                      RETURN/ENTER to be pressed.  You may also press 
  5218.                      Backspace, HOME, or LEFT ARROW - these allow the 
  5219.                      field to be edited again.
  5220.  
  5221.                      The cursor shape indicates whether or not data can 
  5222.                      be entered, or if you are beyond the fields edge.  
  5223.                      The cursor is half size (bottom half) when data can 
  5224.                      be entered, and half size (top half) when you are 
  5225.                      beyond the edge of the field.
  5226.           
  5227.                      BELLs automatically ring when you strike an invalid 
  5228.                      key or attempt to enter data beyond the edge of the 
  5229.                      field.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.                                                            Page: 85
  5242.                                                      The Window BOSS
  5243.  
  5244.  
  5245.  
  5246.         wn_input -- continued.
  5247.  
  5248.  
  5249.  
  5250.              Miscellaneous
  5251.           
  5252.                      Choose your fill character wisely, as you can not 
  5253.                      enter that character as data in a field.  
  5254.           
  5255.                      The data entry routines are pointer intensive. 
  5256.                      Failure to insure that they are called with 
  5257.                      arguments of the right type, size, and dimension 
  5258.                      will certainly cause undesired results.
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.                                                            Page: 86
  5303.                                                      The Window BOSS
  5304.  
  5305.  
  5306.  
  5307.         10.35. wn_frmopn -- open data entry form
  5308.  
  5309.         USAGE
  5310.  
  5311.           wn_frmopn(nfields)
  5312.           
  5313.              int     nfields - number of fields in form plus 1.
  5314.  
  5315.         RETURNS:
  5316.           
  5317.              Pointer to an array of field control blocks. (WIFORM)
  5318.           
  5319.                 or
  5320.           
  5321.              NULL if error (memory could not be allocated)
  5322.           
  5323.         CAUTIONS and ADDITIONAL NOTES:
  5324.           
  5325.              If wn_frmopn returns NULL, no attempt should be made to use 
  5326.              the data entry form in question.  NULL indicates that memory 
  5327.              could not be allocated for the form!
  5328.               
  5329.              This routine must be called before  wn_frmget and wn_frmcls.
  5330.  
  5331.              If your form contains 4 fields the call wn_frmopn as 
  5332.              follows:
  5333.  
  5334.                 WIFORM frm;
  5335.                   
  5336.                   frm = wn_frmopn(5);
  5337.  
  5338.              Fields are sequentially numbered starting from 0 ending at 
  5339.              nfields-2.  The extra field is used for internal purposes.
  5340.  
  5341.              Refer to "SAMPLE.C" for example(s) of usage.
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.                                                            Page: 87
  5364.                                                      The Window BOSS
  5365.  
  5366.  
  5367.  
  5368.         10.36. wn_frmget -- get (read) data entry form
  5369.  
  5370.         USAGE
  5371.  
  5372.           wn_frmget(frm)
  5373.           
  5374.              WIFORM   frm - valid field pointer.
  5375.           
  5376.         RETURNS:
  5377.           
  5378.              TRUE  - indicating all fields of the form in question have 
  5379.                      been fetched and verified (where required).
  5380.  
  5381.              ESC_CODE - indicating ESCape was pressed and form processing
  5382.                      was terminated.
  5383.           
  5384.                 or
  5385.           
  5386.              Never Returns!!
  5387.           
  5388.         CAUTIONS and ADDITIONAL NOTES:
  5389.           
  5390.              As provided, wn_frmget is very usable, however, you may wish 
  5391.              to modify it (source has been provided for this purpose) to 
  5392.              include some of your own custom forms or the way in which 
  5393.              forms are processed when completed. 
  5394.  
  5395.              As distributed, wn_frmget first displays all field prompts 
  5396.              and then positions to the first field, performs data entry 
  5397.              on a field by field basis from the first to the last 
  5398.              (allowing editing along the way), asks for a confirmation to 
  5399.              accept the fields on the form after the last field is 
  5400.              entered, either accepts the form, or drops into edit mode 
  5401.              for all the fields on the form starting at the first field.
  5402.  
  5403.              Refer to wn_input for a discussion of editing keys during 
  5404.              data entry.
  5405.           
  5406.              wn_frmget will not return unless ESCape is pressed or  all 
  5407.              data has been entered and verified (where required).
  5408.               
  5409.              This routine must be called after wn_frmopn, and before 
  5410.              wn_frmcls.
  5411.  
  5412.              Refer to "SAMPLE.C" for example(s) of usage.
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.                                                            Page: 88
  5425.                                                      The Window BOSS
  5426.  
  5427.  
  5428.  
  5429.         10.37. wn_frmcls -- close data entry form
  5430.  
  5431.         USAGE
  5432.  
  5433.              wn_frmcls(frm)
  5434.           
  5435.              (WIFORM) frm - pointer to an array of field control blocks
  5436.           
  5437.         RETURNS:
  5438.           
  5439.              TRUE 
  5440.           
  5441.         CAUTIONS and ADDITIONAL NOTES:
  5442.           
  5443.              This routine should only be called if memory is scarce or 
  5444.              there is no further need for the form you wish to close.  
  5445.              Once a form is closed, all traces of it vanish, the only way 
  5446.              to get it back is to start from scratch with wn_frmopn, 
  5447.              wn_frmget and so on.
  5448.  
  5449.              Closing a form has no impact on its visual image, just its 
  5450.              logical existence. If you wish to make a form vanish both 
  5451.              logically and visually - close the window it is anchored to 
  5452.              after, and only after, closing the form.
  5453.  
  5454.              In this release, a form is not automatically closed when the 
  5455.              window to which it is anchored is closed.  
  5456.  
  5457.              Refer to "SAMPLE.C" for example(s) of usage.
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.                                                            Page: 89
  5486.                                                      The Window BOSS
  5487.  
  5488.  
  5489.  
  5490.         10.38. wn_gdate - input date in window
  5491.  
  5492.         USAGE
  5493.  
  5494.           wn_gdate(fun,frm,fld,wn,row,col,prmpt,atrib,fill,month,day,year,
  5495.                    ubuff,hlpmsg,errmsg)
  5496.           
  5497.              int        fun - function code (SET || XEQ)
  5498.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5499.              int        fld - field # in form (actual || NULL)
  5500.              (WINDOWPTR) wn - window pointer
  5501.              int        row - row in window where data input begins
  5502.              int        col - col in window where data input begins
  5503.              (char *) prmpt - field prompt (call with NSTR for none)
  5504.              unsigned atrib - field (not prompt) attributes 
  5505.              char      fill - field fill character
  5506.              (int *)  month - pointer to int for month (1-12)
  5507.              (int *)    day - pointer to int for day (1-31)
  5508.              (int *)   year - pointer to int for year (0-99)
  5509.              (char *) ubuff - pointer to char array of 10 bytes 
  5510.              (char *)hlpmsg - pointer to help message 
  5511.                               (call with NSTR for none)
  5512.              (char *)errmsg - pointer to err message
  5513.                               (call with NSTR for none)
  5514.           
  5515.         RETURNS:
  5516.           
  5517.              month, day, and year via pointers.
  5518.           
  5519.              NULL if error, else the non zero value returned from 
  5520.              wn_input.
  5521.  
  5522.              "wns_escape" is set to TRUE if the ESCape key caused 
  5523.              wn_input to terminate.  Set to FALSE otherwise.
  5524.           
  5525.         CAUTIONS and ADDITIONAL NOTES:
  5526.           
  5527.              fun - fun can only be SET for form setup, or XEQ for 
  5528.                    immediate execution.  When called with SET, valid 
  5529.                    arguments for both "frm" and "fld" must be specified.  
  5530.                    frm is the field pointer returned from wn_frmopn(), and 
  5531.                    fld is the field sequence number in the form for this 
  5532.                    field.  When called with XEQ frm must be NFRM and fld 
  5533.                    must be NFLD.
  5534.           
  5535.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  5536.                    the data as it is entered.  Minimum size is 10.
  5537.           
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.                                                            Page: 90
  5547.                                                      The Window BOSS
  5548.  
  5549.  
  5550.  
  5551.         wn_gdate continued.
  5552.  
  5553.  
  5554.  
  5555.                    On entry, the first byte of ubuff should be a null, 
  5556.                    otherwise wn_input assumes there is valid data there 
  5557.                    and will enter edit mode.  This can be handy if there 
  5558.                    is a need for prefilled, but editable fields.  In 
  5559.                    actual practice, wn_input uses this buffer for both 
  5560.                    initial character data entry and subsequent editing.
  5561.  
  5562.                    On return, ubuff contains the actual data entered in 
  5563.                    character format with fill and mask characters as 
  5564.                    spaces (e.g. "12 12 88").
  5565.  
  5566.              Only basic reasonability checks are made.  Therefore, dates 
  5567.              like 02/31/88 can be returned.
  5568.           
  5569.              Calls wn_input to perform data entry.
  5570.           
  5571.              Data must satisfy validation checks for function to return.
  5572.  
  5573.              Refer to "SAMPLE.C" for example(s) of usage.
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.                                                            Page: 91
  5608.                                                      The Window BOSS
  5609.  
  5610.  
  5611.  
  5612.         10.39. wn_gtime -- input time in window
  5613.  
  5614.         USAGE
  5615.  
  5616.           wn_gtime(fun,frm,fld,wn,row,col,prmpt,atrib,fill,hrs,mins,
  5617.                    secs,ubuff,hlpmsg,errmsg)
  5618.           
  5619.              int        fun - function code (SET || XEQ)
  5620.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5621.              int        fld - field # in form (actual || NFLD)
  5622.              (WINDOWPTR) wn - window pointer
  5623.              int        row - row in window where data input begins
  5624.              int        col - col in window where data input begins
  5625.              (char *) prmpt - field prompt (call with NSTR for none)
  5626.              unsigned atrib - field (not prompt) attributes 
  5627.              char      fill - field fill character
  5628.              (int *)    hrs - pointer to int for hours (0-24)
  5629.              (int *)   mins - pointer to int for minutes (0-59)
  5630.              (int *)   secs - pointer to int for seconds (0-59)
  5631.              (char *) ubuff - pointer to char array of 10 bytes 
  5632.              (char *)hlpmsg - pointer to help message 
  5633.                               (call with NSTR for none)
  5634.              (char *)errmsg - pointer to err message 
  5635.                               (call with NSTR for none)
  5636.           
  5637.         RETURNS:
  5638.           
  5639.              hrs, mins, and secs via pointers.
  5640.           
  5641.              NULL if error, else the non zero value returned from  
  5642.              wn_input.
  5643.           
  5644.              "wns_escape" is set to TRUE if the ESCape key caused 
  5645.              wn_input to terminate.  Set to FALSE otherwise.
  5646.  
  5647.         CAUTIONS and ADDITIONAL NOTES:
  5648.           
  5649.              fun - fun can only be SET for form setup, or XEQ for 
  5650.                    immediate execution.  When called with SET, valid 
  5651.                    arguments for both "frm" and "fld" must be specified.  
  5652.                    frm is the field pointer returned from wn_frmopn(), and 
  5653.                    fld is the field sequence number in the form for this 
  5654.                    field.  When called with XEQ frm must be NFRM and fld 
  5655.                    must be NFLD.
  5656.           
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.                                                            Page: 92
  5669.                                                      The Window BOSS
  5670.  
  5671.  
  5672.  
  5673.         wn_gtime - continued.
  5674.  
  5675.  
  5676.              
  5677.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5678.                    the data as it is entered.  Minimum size is 10.
  5679.           
  5680.                    On entry, the first byte of ubuff should be a null, 
  5681.                    otherwise wn_input assumes there is valid data there 
  5682.                    and will enter edit mode.  This can be handy if there 
  5683.                    is a need for prefilled, but editable fields.  In 
  5684.                    actual practice, wn_input uses this buffer for both 
  5685.                    initial character data entry and subsequent editing.
  5686.  
  5687.                     On return, ubuff contains the actual data entered in 
  5688.                     character format with fill and mask characters as 
  5689.                     spaces (e.g. "23 59 22").
  5690.           
  5691.              Only basic reasonability checks are made.  Therefore, times 
  5692.              like 24:59:59 can be returned.
  5693.           
  5694.              Calls wn_input to perform data entry.
  5695.           
  5696.              Data must satisfy validation checks for function to return.
  5697.  
  5698.              Refer to "SAMPLE.C" for example(s) of usage.
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.                                                            Page: 93
  5730.                                                      The Window BOSS
  5731.  
  5732.  
  5733.  
  5734.         10.40. wn_gphone -- input phone number in window
  5735.  
  5736.         USAGE
  5737.  
  5738.           wn_gphone(fun,frm,fld,wn,row,col,prmpt,atrib,fill,acode,
  5739.                     nnx,num,ubuff,hlpmsg,errmsg)
  5740.           
  5741.              int        fun - function code (SET || XEQ)
  5742.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5743.              int        fld - field # in form (actual || NFLD)
  5744.              (WINDOWPTR) wn - window pointer
  5745.              int        row - row in window where data input begins
  5746.              int        col - col in window where data input begins
  5747.              (char *) prmpt - field prompt (call with NSTR for none)
  5748.              unsigned atrib - field (not prompt) attributes 
  5749.              char      fill - field fill character
  5750.              (int *)  acode - pointer to int for area code (3 digits)
  5751.              (int *)    nnx - pointer to int for nnx (3 digits)
  5752.              (int *)    num - pointer to int for number (4 digits)
  5753.              (char *) ubuff - pointer to char array of 18 bytes 
  5754.              (char *)hlpmsg - pointer to help message 
  5755.                               (call with NSTR for none)
  5756.              (char *)errmsg - pointer to err message 
  5757.                               (call with NSTR for none)
  5758.           
  5759.         RETURNS:
  5760.           
  5761.              acode, nnx, and num via pointers.
  5762.           
  5763.              NULL if error, else the non zero value returned from 
  5764.              wn_input.
  5765.                
  5766.              "wns_escape" is set to TRUE if the ESCape key caused 
  5767.              wn_input to terminate.  Set to FALSE otherwise.
  5768.  
  5769.         CAUTIONS and ADDITIONAL NOTES:
  5770.           
  5771.              fun - fun can only be SET for form setup, or XEQ for 
  5772.                    immediate execution.  When called with SET, valid 
  5773.                    arguments for both "frm" and "fld" must be specified.  
  5774.                    frm is the field pointer returned from wn_frmopn(), and 
  5775.                    fld is the field sequence number in the form for this 
  5776.                    field.  When called with XEQ frm must be NFRM and fld 
  5777.                    must be NFLD.
  5778.           
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.                                                            Page: 94
  5791.                                                      The Window BOSS
  5792.  
  5793.  
  5794.  
  5795.         wn_gphone - continued.  
  5796.  
  5797.  
  5798.  
  5799.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5800.                    the data as it is entered.  Minimum size is 18 bytes.
  5801.           
  5802.                    On entry, the first byte of ubuff should be a null, 
  5803.                    otherwise wn_input assumes there is valid data there 
  5804.                    and will enter edit mode.  This can be handy if there 
  5805.                    is a need for prefilled, but editable fields.  In 
  5806.                    actual practice, wn_input uses this buffer for both 
  5807.                    initial character data entry and subsequent editing.
  5808.  
  5809.                    On return, ubuff contains the actual data entered in 
  5810.                    character format with fill and mask characters as 
  5811.                    spaces (e.g. 800 555 1212).
  5812.           
  5813.             No validation is performed.
  5814.           
  5815.             Leaving the field blank returns 0 for ACODE, NNX, and NUM.
  5816.           
  5817.             Calls wn_input to perform data entry.
  5818.  
  5819.             Refer to "SAMPLE.C" for example(s) of usage.
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.                                                            Page: 95
  5852.                                                      The Window BOSS
  5853.  
  5854.  
  5855.  
  5856.         10.41. wn_gtext -- input text in window
  5857.         10.42. wn_gutext -- input upper case text in window
  5858.         10.43. wn_gltext -- input lower case text in window
  5859.         10.44. wn_gatext -- input text & graphics characters  
  5860.  
  5861.         USAGE
  5862.  
  5863.           wn_gtext(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  5864.                    ubuff,hlpmsg,errmsg)
  5865.           wn_gutext(..same as wn_gtext)
  5866.           wn_gltext(..same as wn_gtext)
  5867.           wn_gatext(..same as wn_gtext)
  5868.  
  5869.              int        fun - function code (SET || XEQ)
  5870.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5871.              int        fld - field # in form (actual || NFLD)
  5872.              (WINDOWPTR) wn - window pointer
  5873.              int        row - row in window where data input begins
  5874.              int        col - col in window where data input begins
  5875.              (char *) prmpt - field prompt (call with NSTR for none)
  5876.              unsigned atrib - field (not prompt) attributes 
  5877.              char      fill - field fill character
  5878.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  5879.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  5880.              (char *)hlpmsg - pointer to help message 
  5881.                               (call with NSTR for none)
  5882.              (char *)errmsg - pointer to err message 
  5883.                               (call with NSTR for none)
  5884.           
  5885.         RETURNS:
  5886.           
  5887.              ubuff with text data via pointer.
  5888.           
  5889.              NULL if error, else the non zero value returned from 
  5890.              wn_input.
  5891.           
  5892.              "wns_escape" is set to TRUE if the ESCape key caused 
  5893.              wn_input to terminate.  Set to FALSE otherwise.
  5894.  
  5895.         CAUTIONS and ADDITIONAL NOTES:
  5896.  
  5897.              wn_gatext - wn_gatext allows graphics characters to be input.  It 
  5898.                    is otherwise identical to wn_gtext.
  5899.              
  5900.              fun - fun can only be SET for form setup, or XEQ for 
  5901.                    immediate execution.  When called with SET, valid 
  5902.                    arguments for both "frm" and "fld" must be specified.  
  5903.                    frm is the field pointer returned from wn_frmopn(), and 
  5904.                    fld is the field sequence number in the form for this 
  5905.                    field.  When called with XEQ frm must be NFRM and fld 
  5906.                    must be NFLD.
  5907.           
  5908.  
  5909.  
  5910.  
  5911.  
  5912.                                                            Page: 96
  5913.                                                      The Window BOSS
  5914.  
  5915.  
  5916.  
  5917.         wn_gtext - continued.
  5918.  
  5919.  
  5920.  
  5921.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  5922.                     the data as it is entered.  Minimum size is fwidth+2.
  5923.           
  5924.                     On entry, the first byte of ubuff should be a null, 
  5925.                     otherwise wn_input assumes there is valid data there 
  5926.                     and will enter edit mode.  This can be handy if there 
  5927.                     is a need for prefilled, but editable fields.  In 
  5928.                     actual practice, wn_input uses this buffer for both 
  5929.                     initial character data entry and subsequent editing.
  5930.  
  5931.                     On return, ubuff contains the actual data entered in 
  5932.                     character format with fill and mask characters as 
  5933.                     spaces (e.g. "This is a line of text ").
  5934.  
  5935.                     Case conversion is automatically performed when 
  5936.                     wn_gutext() or wn_gltext() are called.
  5937.           
  5938.             Calls wn_input to perform data entry.
  5939.           
  5940.             No validation is performed.
  5941.  
  5942.             Refer to "SAMPLE.C" for example(s) of usage.
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.  
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.  
  5972.  
  5973.                                                            Page: 97
  5974.                                                      The Window BOSS
  5975.  
  5976.  
  5977.  
  5978.         10.45. wn_gpword -- input password in window
  5979.  
  5980.         USAGE
  5981.  
  5982.           wn_gpword(fun,frm,fld,wn,row,col,prmpt,atrib,fill,fwidth,
  5983.                    ubuff,hlpmsg,errmsg)
  5984.           
  5985.              int        fun - function code (SET || XEQ)
  5986.              (WIFORM)   frm - form pointer  (actual || NFRM)
  5987.              int        fld - field # in form (actual || NFLD)
  5988.              (WINDOWPTR) wn - window pointer
  5989.              int        row - row in window where data input begins
  5990.              int        col - col in window where data input begins
  5991.              (char *) prmpt - field prompt (call with NSTR for none)
  5992.              unsigned atrib - field (not prompt) attributes 
  5993.              char      fill - field fill character
  5994.              int     fwidth - width of mask (maximum # of digits is MAXSTR)
  5995.              (char *) ubuff - pointer to char array of fwidth+2 bytes 
  5996.              (char *)hlpmsg - pointer to help message 
  5997.                               (call with NSTR for none)
  5998.              (char *)errmsg - pointer to err message 
  5999.                               (call with NSTR for none)
  6000.           
  6001.         RETURNS:
  6002.           
  6003.              ubuff with text data via pointer.
  6004.           
  6005.              NULL if error, else the non zero value returned from 
  6006.              wn_input.
  6007.           
  6008.              "wns_escape" is set to TRUE if the ESCape key caused 
  6009.              wn_input to terminate.  Set to FALSE otherwise.
  6010.  
  6011.         CAUTIONS and ADDITIONAL NOTES:
  6012.           
  6013.              fun - fun can only be SET for form setup, or XEQ for 
  6014.                    immediate execution.  When called with SET, valid 
  6015.                    arguments for both "frm" and "fld" must be specified.  
  6016.                    frm is the field pointer returned from wn_frmopn(), and 
  6017.                    fld is the field sequence number in the form for this 
  6018.                    field.  When called with XEQ frm must be NFRM and fld 
  6019.                    must be NFLD.
  6020.           
  6021.              ubuff - Editing buffer.  Must be of sufficient size to hold 
  6022.                    the data as it is entered.  Minimum size is fwidth+2.
  6023.           
  6024.                    On entry, the first byte of ubuff should be a null. 
  6025.                    Since this function is for PASSWORD entry, editing is 
  6026.                    not available. The contents of the edit buffer on 
  6027.                    entry is ignored.
  6028.  
  6029.  
  6030.  
  6031.  
  6032.  
  6033.  
  6034.                                                            Page: 98
  6035.                                                      The Window BOSS
  6036.  
  6037.  
  6038.  
  6039.         wn_gpword - continued.
  6040.  
  6041.  
  6042.  
  6043.                     On return, ubuff contains the actual data entered in 
  6044.                     character format with fill and mask characters as 
  6045.                     spaces (e.g. "This is a line of text ").
  6046.           
  6047.             Calls wn_input to perform data entry.
  6048.           
  6049.             No validation is performed. 
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.  
  6080.  
  6081.  
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.                                                            Page: 99
  6096.                                                      The Window BOSS
  6097.  
  6098.  
  6099.  
  6100.         10.46. wn_gint -- input integer in window
  6101.  
  6102.         USAGE
  6103.  
  6104.            wn_gint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6105.                    fwidth,low,high,ubuff,hlpmsg,errmsg)
  6106.           
  6107.               int        fun - function code (SET || XEQ)
  6108.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6109.               int        fld - field # in form (actual || NFLD)
  6110.               (WINDOWPTR) wn - window pointer
  6111.               int        row - row in window where data input begins
  6112.               int        col - col in window where data input begins
  6113.               (char *) prmpt - field prompt (call with NSTR for none)
  6114.               unsigned atrib - field (not prompt) attributes 
  6115.               char      fill - field fill character
  6116.               (int *)  value - pointer to int for return value (low-high)
  6117.               int     fwidth - width of mask 
  6118.                                (maximum # of digits is 6 with sign)
  6119.               int        low - minimum value (lower limit of value)
  6120.               int       high - maximum value (upper limit of value)
  6121.               (char *) ubuff - pointer to char array of 10 bytes 
  6122.               (char *)hlpmsg - pointer to help message 
  6123.                                (call with NSTR for none)
  6124.               (char *)errmsg - pointer to err message 
  6125.                                (call with NSTR for none)
  6126.           
  6127.         RETURNS:
  6128.           
  6129.               value via pointer.
  6130.           
  6131.               NULL if error, else the non zero value returned from 
  6132.               wn_input.
  6133.           
  6134.               "wns_escape" is set to TRUE if the ESCape key caused 
  6135.               wn_input to terminate.  Set to FALSE otherwise.
  6136.  
  6137.         CAUTIONS and ADDITIONAL NOTES:
  6138.           
  6139.             fun -  fun can only be SET for form setup, or XEQ for 
  6140.                    immediate execution.  When called with SET, valid 
  6141.                    arguments for both "frm" and "fld" must be specified.  
  6142.                    frm is the field pointer returned from wn_frmopn(), and 
  6143.                    fld is the field sequence number in the form for this 
  6144.                    field.  When called with XEQ frm must be NFRM and fld 
  6145.                    must be NFLD.
  6146.           
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.                                                            Page: 100
  6157.                                                      The Window BOSS
  6158.  
  6159.  
  6160.  
  6161.         wn_gint - continued.  
  6162.  
  6163.  
  6164.  
  6165.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6166.                     the data as it is entered.  Minimum size is 10 bytes.
  6167.           
  6168.                     On entry, the first byte of ubuff should be a null, 
  6169.                     otherwise wn_input assumes there is valid data there 
  6170.                     and will enter edit mode.  This can be handy if there 
  6171.                     is a need for prefilled, but editable fields.  In 
  6172.                     actual practice, wn_input uses this buffer for both 
  6173.                     initial character data entry and subsequent editing.
  6174.  
  6175.                     On return, ubuff contains the actual data entered in 
  6176.                     character format with fill and mask characters as 
  6177.                     spaces.
  6178.           
  6179.             Calls wn_input to perform data entry.
  6180.           
  6181.             Data must satisfy validation checks for function to return.
  6182.           
  6183.             Calls wn_iemsg(errmsg) when validation fails.
  6184.  
  6185.             Refer to "SAMPLE.C" for example(s) of usage.
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.                                                            Page: 101
  6218.                                                      The Window BOSS
  6219.  
  6220.  
  6221.  
  6222.         10.47. wn_guint - input unsigned integer in window
  6223.  
  6224.         USAGE
  6225.  
  6226.            wn_guint(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6227.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6228.           
  6229.               int        fun - function code (SET || XEQ)
  6230.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6231.               int        fld - field # in form (actual || NFLD)
  6232.               (WINDOWPTR)wn  - window pointer
  6233.               int        row - row in window where data input begins
  6234.               int        col - col in window where data input begins
  6235.               (char *) prmpt - field prompt (call with NSTR for none)
  6236.               unsigned atrib - field (not prompt) attributes 
  6237.               char      fill - field fill character
  6238.               (unsigned *) v - pointer to int for return value (low-high)
  6239.               int     fwidth - width of mask 
  6240.                                (maximum # of digits is 6 with sign)
  6241.               unsigned   low - minimum value (lower limit of value)
  6242.               unsigned  high - maximum value (upper limit of value)
  6243.               (char *) ubuff - pointer to char array of 10 bytes 
  6244.               (char *)hlpmsg - pointer to help message 
  6245.                                (call with NSTR for none)
  6246.               (char *)errmsg - pointer to err message 
  6247.                                (call with NSTR for none)
  6248.           
  6249.         RETURNS:
  6250.           
  6251.               v via pointer.
  6252.           
  6253.               NULL if error, else the non zero value returned from 
  6254.               wn_input.
  6255.           
  6256.               "wns_escape" is set to TRUE if the ESCape key caused 
  6257.               wn_input to terminate.  Set to FALSE otherwise.
  6258.  
  6259.         CAUTIONS and ADDITIONAL NOTES:
  6260.           
  6261.             fun -  fun can only be SET for form setup, or XEQ for 
  6262.                    immediate execution.  When called with SET, valid 
  6263.                    arguments for both "frm" and "fld" must be specified.  
  6264.                    frm is the field pointer returned from wn_frmopn(), and 
  6265.                    fld is the field sequence number in the form for this 
  6266.                    field.  When called with XEQ frm must be NFRM and fld 
  6267.                    must be NFLD.
  6268.           
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.                                                            Page: 102
  6279.                                                      The Window BOSS
  6280.  
  6281.  
  6282.  
  6283.         wn_guint - continued.
  6284.  
  6285.  
  6286.  
  6287.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6288.                    the data as it is entered.  Minimum size is 10 bytes.
  6289.  
  6290.                    On entry, the first byte of ubuff should be a null, 
  6291.                    otherwise wn_input assumes there is valid data there 
  6292.                    and will enter edit mode.  This can be handy if there 
  6293.                    is a need for prefilled, but editable fields.  In 
  6294.                    actual practice, wn_input uses this buffer for both 
  6295.                    initial character data entry and subsequent editing.
  6296.  
  6297.                    On return, ubuff contains the actual data entered in 
  6298.                    character format with fill and mask characters as 
  6299.                    spaces (e.g. "-24000").
  6300.           
  6301.             Calls wn_input to perform data entry.
  6302.           
  6303.             Data must satisfy validation checks for function to return.
  6304.           
  6305.             Calls wn_iemsg(errmsg) when validation fails.
  6306.  
  6307.             Refer to "SAMPLE.C" for example(s) of usage.
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.  
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.                                                            Page: 103
  6340.                                                      The Window BOSS
  6341.  
  6342.  
  6343.  
  6344.         10.48. wn_glong -- input long integer in window
  6345.  
  6346.         USAGE
  6347.  
  6348.            wn_glong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6349.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6350.           
  6351.               int        fun - function code (SET || XEQ)
  6352.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6353.               int        fld - field # in form (actual || NFLD)
  6354.               (WINDOWPTR) wn - window pointer
  6355.               int        row - row in window where data input begins
  6356.               int        col - col in window where data input begins
  6357.               (char *) prmpt - field prompt (call with NSTR for none)
  6358.               unsigned atrib - field (not prompt) attributes 
  6359.               char      fill - field fill character
  6360.               (long*)  value - pointer to long for return value (low-high)
  6361.               int     fwidth - width of mask 
  6362.                                (maximum # of digits is 10 with sign)
  6363.               long       low - minimum value (lower limit of value)
  6364.               long      high - maximum value (upper limit of value)
  6365.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6366.               (char *)hlpmsg - pointer to help message 
  6367.                                (call with NSTR for none)
  6368.               (char *)errmsg - pointer to err message 
  6369.                                (call with NSTR for none)
  6370.           
  6371.         RETURNS:
  6372.           
  6373.               v via pointer.
  6374.           
  6375.               NULL if error, else the non zero value returned from 
  6376.               wn_input.
  6377.           
  6378.               "wns_escape" is set to TRUE if the ESCape key caused 
  6379.               wn_input to terminate.  Set to FALSE otherwise.
  6380.  
  6381.         CAUTIONS and ADDITIONAL NOTES:
  6382.           
  6383.             fun -  fun can only be SET for form setup, or XEQ for 
  6384.                    immediate execution.  When called with SET, valid 
  6385.                    arguments for both "frm" and "fld" must be specified.  
  6386.                    frm is the field pointer returned from wn_frmopn(), and 
  6387.                    fld is the field sequence number in the form for this 
  6388.                    field.  When called with XEQ frm must be NFRM and fld 
  6389.                    must be NFLD.
  6390.           
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.                                                            Page: 104
  6401.                                                      The Window BOSS
  6402.  
  6403.  
  6404.  
  6405.         wn_glong - continued.  
  6406.  
  6407.  
  6408.  
  6409.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6410.                    the data as it is entered.  Minimum size is fwidth+2.
  6411.           
  6412.                    On entry, the first byte of ubuff should be a null, 
  6413.                    otherwise wn_input assumes there is valid data there 
  6414.                    and will enter edit mode.  This can be handy if there 
  6415.                    is a need for prefilled, but editable fields.  In 
  6416.                    actual practice, wn_input uses this buffer for both 
  6417.                    initial character data entry and subsequent editing.
  6418.  
  6419.                    On return, ubuff contains the actual data entered in 
  6420.                    character format with fill and mask characters as 
  6421.                    spaces (e.g. "-24000").
  6422.           
  6423.             Calls wn_input to perform data entry.
  6424.           
  6425.             Data must satisfy validation checks for function to return.
  6426.           
  6427.             Calls wn_iemsg(errmsg) when validation fails.
  6428.  
  6429.             Refer to "SAMPLE.C" for example(s) of usage.
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.                                                            Page: 105
  6462.                                                      The Window BOSS
  6463.  
  6464.  
  6465.  
  6466.         10.49. wn_gulong -- input unsigned long integer in window
  6467.  
  6468.         USAGE
  6469.  
  6470.            wn_gulong(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6471.                     fwidth,low,high,ubuff,hlpmsg,errmsg)
  6472.           
  6473.               int        fun - function code (SET || XEQ)
  6474.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6475.               int        fld - field # in form (actual || NFLD)
  6476.               (WINDOWPTR) wn - window pointer
  6477.               int        row - row in window where data input begins
  6478.               int        col - col in window where data input begins
  6479.               (char *) prmpt - field prompt (call with NSTR for none)
  6480.               unsigned atrib - field (not prompt) attributes 
  6481.               char      fill - field fill character
  6482.               (unsigned long*) value - 
  6483.                                pointer to long for return value (low-high)
  6484.               int     fwidth - width of mask 
  6485.                                (maximum # of digits is 10 with sign)
  6486.               unsigned long low -
  6487.                                minimum value (lower limit of value)
  6488.               unsigned long high -
  6489.                                maximum value (upper limit of value)
  6490.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6491.               (char *)hlpmsg - pointer to help message 
  6492.                                (call with NSTR for none)
  6493.               (char *)errmsg - pointer to err message 
  6494.                                (call with NSTR for none)
  6495.           
  6496.         RETURNS:
  6497.           
  6498.               v via pointer.
  6499.           
  6500.               NULL if error, else the non zero value returned from 
  6501.               wn_input.
  6502.           
  6503.               "wns_escape" is set to TRUE if the ESCape key caused 
  6504.               wn_input to terminate.  Set to FALSE otherwise.
  6505.  
  6506.         CAUTIONS and ADDITIONAL NOTES:
  6507.           
  6508.             fun -  fun can only be SET for form setup, or XEQ for 
  6509.                    immediate execution.  When called with SET, valid 
  6510.                    arguments for both "frm" and "fld" must be specified.  
  6511.                    frm is the field pointer returned from wn_frmopn(), and 
  6512.                    fld is the field sequence number in the form for this 
  6513.                    field.  When called with XEQ frm must be NFRM and fld 
  6514.                    must be NFLD.
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.                                                            Page: 106
  6523.                                                      The Window BOSS
  6524.  
  6525.  
  6526.  
  6527.         wn_gulong - continued.  
  6528.  
  6529.  
  6530.  
  6531.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6532.                    the data as it is entered.  Minimun size is fwidth+2.
  6533.           
  6534.                    On entry, the first byte of ubuff should be a null, 
  6535.                    otherwise wn_input assumes there is valid data there 
  6536.                    and will enter edit mode.  This can be handy if there 
  6537.                    is a need for prefilled, but editable fields.  In 
  6538.                    actual practice, wn_input uses this buffer for both 
  6539.                    initial character data entry and subsequent editing.
  6540.                    On return, ubuff contains the actual data entered in 
  6541.                    character format with fill and mask characters as 
  6542.                    spaces (e.g. "-24000").
  6543.           
  6544.             Calls wn_input to perform data entry.
  6545.           
  6546.             Data must satisfy validation checks for function to return.
  6547.           
  6548.             Calls wn_iemsg(errmsg) when validation fails.
  6549.  
  6550.  
  6551.  
  6552.  
  6553.  
  6554.  
  6555.  
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.  
  6564.  
  6565.  
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.                                                            Page: 107
  6584.                                                      The Window BOSS
  6585.  
  6586.  
  6587.  
  6588.         10.50. wn_gfloat -- input float in window
  6589.  
  6590.         USAGE
  6591.  
  6592.            wn_gfloat(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6593.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  6594.           
  6595.               int        fun - function code (SET || XEQ)
  6596.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6597.               int        fld - field # in form (actual || NFLD)
  6598.               (WINDOWPTR) wn - window pointer
  6599.               int        row - row in window where data input begins
  6600.               int        col - col in window where data input begins
  6601.               (char *) prmpt - field prompt (call with NSTR for none)
  6602.               unsigned atrib - field (not prompt) attributes 
  6603.               char      fill - field fill character
  6604.               (float  *)   v - pointer to float for return value
  6605.               int     fwidth - width of mask 
  6606.                                (maximum # of digits is 20 with sign)
  6607.               int       ndec - # of decimal places 
  6608.               float      low - minimum value (lower limit of value)
  6609.               float     high - maximum value (upper limit of value)
  6610.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6611.               (char *)hlpmsg - pointer to help message 
  6612.                                (call with NSTR for none)
  6613.               (char *)errmsg - pointer to err message 
  6614.                                (call with NSTR for none)
  6615.           
  6616.         RETURNS:
  6617.           
  6618.               v via pointer.
  6619.           
  6620.               NULL if error, else the non zero value returned from 
  6621.               wn_input.
  6622.           
  6623.               "wns_escape" is set to TRUE if the ESCape key caused 
  6624.               wn_input to terminate.  Set to FALSE otherwise.
  6625.  
  6626.         CAUTIONS and ADDITIONAL NOTES:
  6627.           
  6628.             fun -  fun can only be SET for form setup, or XEQ for 
  6629.                    immediate execution.  When called with SET, valid 
  6630.                    arguments for both "frm" and "fld" must be specified.  
  6631.                    frm is the field pointer returned from wn_frmopn(), and 
  6632.                    fld is the field sequence number in the form for this 
  6633.                    field.  When called with XEQ frm must be NFRM and fld 
  6634.                    must be NFLD.
  6635.           
  6636.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6637.                    the data as it is entered.  Minimum size is fwidth+2. 
  6638.           
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.                                                            Page: 108
  6645.                                                      The Window BOSS
  6646.  
  6647.  
  6648.  
  6649.         wn_gfloat - continued.
  6650.  
  6651.  
  6652.                     
  6653.                    On entry, the first byte of ubuff should be a null, 
  6654.                    otherwise wn_input assumes there is valid data there 
  6655.                    and will enter edit mode.  This can be handy if there 
  6656.                    is a need for prefilled, but editable fields.  In 
  6657.                    actual practice, wn_input uses this buffer for both 
  6658.                    initial character data entry and subsequent editing.
  6659.  
  6660.                    On return, ubuff contains the actual data entered in 
  6661.                    character format with fill and mask characters as 
  6662.                    spaces (e.g. "   -1240.20").
  6663.           
  6664.             Calls wn_input to perform data entry.
  6665.           
  6666.             Data must satisfy validation checks for function to return.
  6667.           
  6668.             Calls wn_iemsg(errmsg) when validation fails.
  6669.  
  6670.             Refer to "SAMPLE.C" for example(s) of usage.
  6671.  
  6672.             WN_GFLOAT.C is provided in source form.
  6673.  
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.  
  6689.  
  6690.  
  6691.  
  6692.  
  6693.  
  6694.  
  6695.  
  6696.  
  6697.  
  6698.  
  6699.  
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.                                                            Page: 109
  6706.                                                      The Window BOSS
  6707.  
  6708.  
  6709.  
  6710.         10.51. wn_gdouble -- input double in window
  6711.  
  6712.         USAGE
  6713.  
  6714.            wn_gdouble(fun,frm,fld,wn,row,col,prmpt,atrib,fill,v,
  6715.                      fwidth,ndec,low,high,ubuff,hlpmsg,errmsg)
  6716.           
  6717.               int        fun - function code (SET || XEQ)
  6718.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6719.               int        fld - field # in form (actual || NFLD)
  6720.               (WINDOWPTR) wn - window pointer
  6721.               int        row - row in window where data input begins
  6722.               int        col - col in window where data input begins
  6723.               (char *) prmpt - field prompt (call with NSTR for none)
  6724.               unsigned atrib - field (not prompt) attributes 
  6725.               char      fill - field fill character
  6726.               (double *)   v - pointer to float for return value
  6727.               int     fwidth - width of mask 
  6728.                                (maximum # of digits is 20 with sign)
  6729.               int       ndec - # of decimal places 
  6730.               double     low - minimum value (lower limit of value)
  6731.               double    high - maximum value (upper limit of value)
  6732.               (char *) ubuff - pointer to char array of fwidth+2 bytes 
  6733.               (char *)hlpmsg - pointer to help message 
  6734.                                (call with NSTR for none)
  6735.               (char *)errmsg - pointer to err message 
  6736.                                (call with NSTR for none)
  6737.           
  6738.         RETURNS:
  6739.           
  6740.               v via pointer.
  6741.           
  6742.               NULL if error, else the non zero value returned from 
  6743.               wn_input.
  6744.           
  6745.               "wns_escape" is set to TRUE if the ESCape key caused  
  6746.               wn_input to terminate.  Set to FALSE otherwise.
  6747.  
  6748.         CAUTIONS AND ADDITIONAL NOTES:
  6749.                       
  6750.               fun - fun can only be SET for form setup, or XEQ for 
  6751.                    immediate execution.  When called with SET, valid 
  6752.                    arguments for both "frm" and "fld" must be specified.  
  6753.                    frm is the field pointer returned from wn_frmopn(), 
  6754.                    and fld is the field sequence number in the form for 
  6755.                    this field.  When called with XEQ frm must be NFRM and 
  6756.                    fld must be NFLD.
  6757.                       
  6758.               ubuff - Editing buffer.  Must be of sufficient size to hold 
  6759.                    the data as it is entered.  Minimum size is fwidth+2. 
  6760.                       
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.                                                            Page: 110
  6767.                                                      The Window BOSS
  6768.  
  6769.  
  6770.  
  6771.                     wn_gdouble - continued.
  6772.  
  6773.  
  6774.                       
  6775.                    On entry, the first byte of ubuff should be a null, 
  6776.                    otherwise wn_input assumes there is valid data there 
  6777.                    and will enter edit mode.  This can be handy if there 
  6778.                    is a need for prefilled, but editable fields.  In 
  6779.                    actual practice, wn_input uses this buffer for both 
  6780.                    initial character data entry and subsequent editing.
  6781.  
  6782.                    On return, ubuff contains the actual data entered in 
  6783.                    character format with fill and mask characters as 
  6784.                    spaces (e.g. "   -1240.20").
  6785.                       
  6786.                         Calls wn_input to perform data entry.
  6787.                       
  6788.                    Data must satisfy validation checks for function to 
  6789.                    return.
  6790.                       
  6791.                    Calls wn_iemsg(errmsg) when validation fails.
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.  
  6821.  
  6822.  
  6823.  
  6824.  
  6825.  
  6826.  
  6827.                                                            Page: 111
  6828.                                                      The Window BOSS
  6829.  
  6830.  
  6831.  
  6832.         10.52. wn_gbool -- input logical in window
  6833.  
  6834.         USAGE
  6835.  
  6836.           wn_gbool(fun,frm,fld,wn,row,col,prmpt,atrib,fill,value,
  6837.                    ubuff,hlpmsg,errmsg)
  6838.                       
  6839.               int        fun - function code (SET || XEQ)
  6840.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6841.               int        fld - field # in form (actual || NFLD)
  6842.               (WINDOWPTR) wn - window pointer
  6843.               int        row - row in window where data input begins
  6844.               int        col - col in window where data input begins
  6845.               (char *) prmpt - field prompt (call with NSTR for none)
  6846.               unsigned atrib - field (not prompt) attributes 
  6847.               char      fill - field fill character
  6848.               (int *)  value - pointer to int for value (0=FALSE, 1=TRUE)
  6849.               (char *) ubuff - pointer to char array of 3 bytes 
  6850.               (char *)hlpmsg - pointer to help message 
  6851.                                (call with NSTR for none)
  6852.               (char *)errmsg - pointer to err message 
  6853.                                (call with NSTR for none)
  6854.           
  6855.         RETURNS:
  6856.           
  6857.               value via pointer (0=FALSE, 1=TRUE)
  6858.           
  6859.               NULL if error, else the non zero value returned from 
  6860.               wn_input.
  6861.           
  6862.               "wns_escape" is set to TRUE if the ESCape key caused 
  6863.               wn_input to terminate.  Set to FALSE otherwise.
  6864.  
  6865.         CAUTIONS and ADDITIONAL NOTES:
  6866.           
  6867.             fun -  fun can only be SET for form setup, or XEQ for 
  6868.                    immediate execution.  When called with SET, valid 
  6869.                    arguments for both "frm" and "fld" must be specified.  
  6870.                    frm is the field pointer returned from wn_frmopn(), and 
  6871.                    fld is the field sequence number in the form for this 
  6872.                    field.  When called with XEQ frm must be NFRM and fld 
  6873.                    must be NFLD.
  6874.           
  6875.             ubuff - Editing buffer.  Must be of sufficient size to hold 
  6876.                    the data as it is entered.  Minimum size is 3 bytes.f
  6877.           
  6878.                    On entry, the first byte of ubuff should be a null, 
  6879.                    otherwise wn_input assumes there is valid data there 
  6880.                    and will enter edit mode.  This can be handy if there 
  6881.                    is a need for prefilled, but editable fields.  In 
  6882.                    actual practice, wn_input uses this buffer for both 
  6883.                    initial character data entry and subsequent editing.
  6884.  
  6885.  
  6886.  
  6887.  
  6888.                                                            Page: 112
  6889.                                                      The Window BOSS
  6890.  
  6891.  
  6892.  
  6893.         wn_gbool - continued.
  6894.  
  6895.  
  6896.  
  6897.                    On return, ubuff contains the actual data entered in 
  6898.                    character format with fill and mask characters as 
  6899.                    spaces (e.g. "T").
  6900.           
  6901.             Calls wn_input to perform data entry.
  6902.           
  6903.             User MUST enter T,F,Y, or N.
  6904.           
  6905.             Data must satisfy validation checks for function to return.
  6906.           
  6907.             Calls wn_iemsg(errmsg) when validation fails.
  6908.           
  6909.             Refer to "SAMPLE.C" for example(s) of usage.
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.                                                            Page: 113
  6950.                                                      The Window BOSS
  6951.  
  6952.  
  6953.  
  6954.         10.53. wn_dtext -- display text on input form
  6955.  
  6956.         USAGE
  6957.  
  6958.            wn_dtext(fun,frm,fld,wn,row,col,prmpt)
  6959.           
  6960.               int        fun - function code (SET || XEQ)
  6961.               (WIFORM)   frm - form pointer  (actual || NFRM)
  6962.               int        fld - field # in form (actual || NFLD)
  6963.               (WINDOWPTR) wn - window pointer
  6964.               int        row - row in window where data input begins
  6965.               int        col - col in window where data input begins
  6966.               (char *) prmpt - field prompt (call with NSTR for none)
  6967.           
  6968.         RETURNS:
  6969.           
  6970.               TRUE if fun==SET 
  6971.           
  6972.                or
  6973.           
  6974.               Normal return value of wn_puts if fun==XEQ
  6975.           
  6976.         CAUTIONS and ADDITIONAL NOTES:
  6977.           
  6978.             fun -  fun can only be SET for form setup, or XEQ for 
  6979.                    immediate execution.  When called with SET, valid 
  6980.                    arguments for both "frm" and "fld" must be specified.  
  6981.                    frm is the field pointer returned from wn_frmopn(), and 
  6982.                    fld is the field sequence number in the form for this 
  6983.                    field.  When called with XEQ frm must be NFRM and fld 
  6984.                    must be NFLD.
  6985.  
  6986.             Refer to "SAMPLE.C" for example(s) of usage.
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.  
  6993.  
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.                                                            Page: 114
  7011.                                                      The Window BOSS
  7012.  
  7013.  
  7014.  
  7015.         10.54. wn_iemsg -- display input error message
  7016.  
  7017.         USAGE
  7018.  
  7019.            wn_iemsg(msg)
  7020.           
  7021.               (char *)   msg - pointer to message to be displayed.
  7022.           
  7023.         RETURNS:
  7024.           
  7025.               NULL if error, else TRUE
  7026.           
  7027.         CAUTIONS and ADDITIONAL NOTES:
  7028.           
  7029.             This routine should be modified or replaced with code to suit 
  7030.             your application's specific needs.  It hooks to wn_g???? 
  7031.             such that whenever the field validation fails wn_g???? calls 
  7032.             wn_iemsg to display an error message for the field in 
  7033.             question.  The hooks in wn_g????? are of the form:
  7034.           
  7035.                 if(validation failed) wn_iemsg(msg);
  7036.           
  7037.             This routine displays a single line of text on the 25th line 
  7038.             and waits for a key to be struck before returning to accept 
  7039.             new data for the field in question.
  7040.           
  7041.             The error message can be a maximum of 80 characters, and must 
  7042.             not contain any formatting directives (\n\t...).
  7043.           
  7044.             Some wn_g???? functions (i.e. wn_gtext) have no provision to 
  7045.             validate data and therefore never attempt to call this 
  7046.             routine.
  7047.  
  7048.             WN_IEMSG.C is provided in source form.
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.  
  7059.  
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.  
  7067.  
  7068.  
  7069.  
  7070.  
  7071.                                                            Page: 115
  7072.                                                      The Window BOSS
  7073.  
  7074.  
  7075.  
  7076.         10.55. wn_ihmsg -- display input help message
  7077.           
  7078.         USAGE
  7079.           
  7080.            wn_ihmsg(msg)
  7081.           
  7082.               (char *)   msg - pointer to message to be displayed.
  7083.           
  7084.         RETURNS:
  7085.           
  7086.             NULL if error, else TRUE
  7087.           
  7088.         CAUTIONS and ADDITIONAL NOTES:
  7089.           
  7090.             This routine should be modified or replaced with code to suit 
  7091.             your application's specific needs.  It hooks to wn_input 
  7092.             such that whenever the HELP key is pressed wn_input calls 
  7093.             wn_ihmsg to display a help message for the field in question.  
  7094.             The hooks in wn_input are of the form:
  7095.           
  7096.                 if(key_struck == HELP) wn_ihmsg(msg);
  7097.           
  7098.             The F1 key is the default HELP key.  This can be changed by 
  7099.             calling the wns_shkey() function.
  7100.  
  7101.             This routine displays a single line of help on the 25th line 
  7102.             and waits for a key to be struck before returning.
  7103.           
  7104.             The help message can be a maximum of 80 characters, and must 
  7105.             not contain any formatting directives (\n\t...).
  7106.  
  7107.             WN_IHMSG is provided in source form.
  7108.  
  7109.  
  7110.         10.56. wn_shkey -- set HELP key code
  7111.  
  7112.         USAGE
  7113.  
  7114.             wn_shkey(code)
  7115.             unsigned int code;
  7116.  
  7117.               code - scancode of the key to be defined as the HELP key.
  7118.  
  7119.             F1 is the default HELP key.  The scancode for F1 is 0x3B00.              
  7120.  
  7121.         RETURNS
  7122.  
  7123.              Nothing.
  7124.  
  7125.         CAUTIONS and ADDITIONAL NOTES:
  7126.  
  7127.              SCANCODE.C can be used to determine the scancodes for any 
  7128.              and all keys.
  7129.  
  7130.  
  7131.  
  7132.                                                            Page: 116
  7133.                                                      The Window BOSS
  7134.  
  7135.  
  7136.  
  7137.         10.57. wn_popup -- display and act on popup menu
  7138.  
  7139.         USAGE
  7140.  
  7141.           wn_popup(page,row,col,width,height,atrib,batrib,mx,cflag)
  7142.           int page, row, col, width, height, cflag;
  7143.           unsigned int atrib, batrib;
  7144.           struct pmenu *mx;
  7145.  
  7146.              page -    video page (Always 0)
  7147.              row  -    row of origin 
  7148.              col  -    col of origin 
  7149.              width -   width (inside dimension)
  7150.              height -  height (inside dimension)
  7151.              atrib -   window attribute
  7152.              batrib -  border attribute
  7153.              mx -      pointer to menu structure
  7154.              cflag -   close on return flag (FALSE to leave open)
  7155.  
  7156.           The pmenu structure is defined in "windows.h" (replicated here 
  7157.           for clarity) and must be initialized prior to calling wn_popup.
  7158.  
  7159.           struct mitem {              /* POPUP menu item template */
  7160.             int r;                    /* row */
  7161.             int c;                    /* col */
  7162.             char *t;                  /* text */
  7163.             int rv;                   /* return value */
  7164.           };
  7165.  
  7166.           struct pmenu {              /* POPUP menu structure */
  7167.             WINDOWPTR wpsave;         /* place to hold window id */
  7168.             int winopn;               /* leave window open flag */
  7169.             int lndx;                 /* last index */
  7170.             int fm;                   /* first menu item index */
  7171.             int lm;                   /* last menu item index */
  7172.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7173.           };                          /* NOTE RELATIVE LIMIT */
  7174.  
  7175.         RETURNS:
  7176.  
  7177.           The return code for the menu item selected or 99 if ESCape is 
  7178.           pressed.
  7179.  
  7180.         CAUTIONS and ADDITIONAL NOTES:
  7181.  
  7182.           None.
  7183.  
  7184.         SEE ALSO
  7185.  
  7186.           Popup menu basics.
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.                                                            Page: 117
  7194.                                                      The Window BOSS
  7195.  
  7196.  
  7197.  
  7198.         10.58. wn_qpopup -- display quick popup window
  7199.  
  7200.         USAGE
  7201.  
  7202.           WINDOPTR wn_qpopup(page,row,col,width,height,atrib,batrib,mx)
  7203.           int page, row, col, width, height, cflag;
  7204.           unsigned int atrib, batrib;
  7205.           struct pmenu *mx;
  7206.  
  7207.              page -    video page (Always 0)
  7208.              row  -    row of origin (0 to WN_MAXROWS)
  7209.              col  -    col of origin (0 to WN_MAXCOLS)
  7210.              width -   width (inside dimension)
  7211.              height -  height (inside dimension)
  7212.              atrib -   window attribute
  7213.              batrib -  border attribute
  7214.              mx -      pointer to menu structure
  7215.  
  7216.           The pmenu structure is defined in "windows.h" (replicated here 
  7217.           for clarity) and must be initialized prior to calling wn_popup.
  7218.  
  7219.           struct mitem {              /* POPUP menu item template */
  7220.             int r;                    /* row */
  7221.             int c;                    /* col */
  7222.             char *t;                  /* text */
  7223.             int rv;                   /* return value */
  7224.           };
  7225.  
  7226.           struct pmenu {              /* POPUP menu structure */
  7227.             WINDOWPTR wpsave;         /* place to hold window id */
  7228.             int winopn;               /* leave window open flag */
  7229.             int lndx;                 /* last index */
  7230.             int fm;                   /* first menu item index */
  7231.             int lm;                   /* last menu item index */
  7232.             struct mitem scrn[WN_MXROWS*4]; /* a bunch of menu items */
  7233.           };                          /* NOTE RELATIVE LIMIT */
  7234.  
  7235.         RETURNS:
  7236.  
  7237.           A WINDOWPTR to the popup window that has been displayed.
  7238.  
  7239.         CAUTIONS and ADDITIONAL NOTES:
  7240.  
  7241.           None.
  7242.  
  7243.         SEE ALSO
  7244.  
  7245.           Popup menu basics.
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.                                                            Page: 118
  7255.                                                      The Window BOSS
  7256.  
  7257.  
  7258.  
  7259.         10.59. wh_hlinit -- initialize help system
  7260.  
  7261.         USAGE
  7262.  
  7263.           wn_hlinit(row, col, width, height, atrib, batrib, file)
  7264.           int page, row, col, width, height, atrib, batrib;
  7265.           char *file;
  7266.  
  7267.                 row  -  row of upper left hand corner of the window
  7268.                 col  -  column of upper left hand corner of the window
  7269.                 width - INSIDE dimension (max value is 78 for a 80 column 
  7270.                         wide display)
  7271.                 height- INSIDE dimension (max value is 23 for a 25 row 
  7272.                         high display)
  7273.                 atrib - attribute to be used IN the window
  7274.                 batrib- attribute to be used for the border
  7275.                 file  - help file name (assumes ".HLP" extension)
  7276.           
  7277.           Unless you modify the code in WN_HELP.C, wn_hlint calls should 
  7278.           always take the form of:
  7279.  
  7280.             wn_hlinit(0,0,78,23,(BLUE<<4|WHITE),(BLUE<<4|WHITE),file);
  7281.                       |                                       |  | 
  7282.                       +--------------\/-----------------------+  |
  7283.                                   Use as is                      |
  7284.                                                                  |
  7285.                                     YOUR ".HLP" file's name -----+                                                    
  7286.  
  7287.           Unless you modify the code in WN_HELP.C, "HLP" files should be 
  7288.           formatted according to the following convention:
  7289.  
  7290.              %key_word%  - max 25 characters, ALWAYS begin in position 1,
  7291.                            always enclosed within percent signs.
  7292.  
  7293.              text        - starts in column 3, ends in 76, contains a                  
  7294.                            maximum of 20 lines per screen. Text, 
  7295.                            including any leading and/or trailing blank 
  7296.                            lines and/or spaces is always immediately 
  7297.                            preceded by a key word or the .cp command. 
  7298.                            (Use blank lines at the top to center 
  7299.                            vertically.  Use spaces at the left of each 
  7300.                            line to center horizontally.)
  7301.  
  7302.              .cp         - starts in column 1. Command that signals end 
  7303.                            of screen in a series of 2 or more help 
  7304.                            screens.  Precedes or succeeds text.
  7305.  
  7306.              *END*       - starts in column 1. Command that signals end
  7307.                            of help. Succeeds text.
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.                                                            Page: 119
  7316.                                                      The Window BOSS
  7317.  
  7318.  
  7319.  
  7320.         wn_hlinit - continued.
  7321.  
  7322.  
  7323.  
  7324.           A typical HLP file would look something like.
  7325.  
  7326.              00000...............................................77778
  7327.              12345...............................................67890
  7328.  
  7329.              %subject 1%
  7330.                            Title of Screen 1 - Subject 1
  7331.              
  7332.                This is a sample help screen for screen number 1 
  7333.                of a multi screen message.
  7334.              .cp
  7335.                            Title of Screen 2 - Subject 1
  7336.  
  7337.                This the second screen of a multi screen help 
  7338.                message for subject1.
  7339.              *END*
  7340.  
  7341.              %subject 2%
  7342.                            Title of Screen 1 - Subject 2     
  7343.  
  7344.                This is a sample help screen for a single screen 
  7345.                help message.
  7346.              *END*
  7347.  
  7348.           Later, when wn_help is called, text will be sequentially 
  7349.           displayed a screen at a time from the subject keyword through 
  7350.           any number of .cp delimited screens through and including the 
  7351.           screen delimited by *END*.  The system allows for forward and 
  7352.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  7353.           the end of a single screen in a series of 2 or more screens.  
  7354.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  7355.           previous screen, any other key to continue..." will be 
  7356.           displayed.  When *END* is detected, the message "End of help, 
  7357.           PgUp for previous screen, any other key to continue..." is 
  7358.           displayed.  
  7359.  
  7360.         RETURNS:
  7361.  
  7362.           TRUE if all is well.
  7363.  
  7364.           FALSE the help file (.HLP) or its index file (.NDX) could not 
  7365.           be found or open.  A FALSE return can also be caused by a lack 
  7366.           of free memory for the memory resident file index or the file 
  7367.           buffers themselves.
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.                                                            Page: 120
  7377.                                                      The Window BOSS
  7378.  
  7379.  
  7380.  
  7381.         wn_hlinit - continued.
  7382.  
  7383.  
  7384.  
  7385.         CAUTIONS and ADDITIONAL NOTES:
  7386.  
  7387.           wn_hlinit requires both the ".HLP" and ".NDX" files to be 
  7388.           present when called. "NDX" files are produced by GENINDEX.  The 
  7389.           source to GENINDEX can be found in GENINDEX.C.  
  7390.  
  7391.           As implemented, the help system is configured to provide a full 
  7392.           screen text message, subject keys are limited to 25 characters, 
  7393.           and there is a limit of 255 subject keys per file.  This can be 
  7394.           changed by modifying the functions found in "wn_help.c"  THERE 
  7395.           IS A DIRECT CORRELATION BETWEEN THE PARAMETERS USED TO 
  7396.           INITIALIZE THE HELP SYSTEM AND THE LAYOUT OF THE ASCII TEXT 
  7397.           FILE READ BY THE GENINDEX PROGRAM.  If you modify the code be 
  7398.           sure to modify the location and text of the messages to be 
  7399.           displayed when .cp and/or *END* are dectected.
  7400.  
  7401.         SEE ALSO
  7402.  
  7403.           Help system basics, wn_help
  7404.  
  7405.  
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434.  
  7435.  
  7436.  
  7437.                                                            Page: 121
  7438.                                                      The Window BOSS
  7439.  
  7440.  
  7441.  
  7442.         10.60. wn_help -- display help message 
  7443.  
  7444.         USAGE
  7445.  
  7446.           wn_help(key_word)
  7447.           char *key_word;
  7448.  
  7449.              char *key_word - valid keyword contained in help file named 
  7450.                               in the call to wn_hlinit.
  7451.  
  7452.           The text associated with the key_word will be sequentially 
  7453.           displayed a screen at a time from the subject keyword through 
  7454.           any number of .cp delimited screens through and including the 
  7455.           screen delimited by *END*.  The system allows for forward and 
  7456.           reverse display via the PgUp and PgDn keys.  The .cp signals 
  7457.           the end of a single screen in a series of 2 or more screens.  
  7458.           When .cp is detected, the message  "Esc to quit help, PgUp for 
  7459.           previous screen, any other key to continue..." will be 
  7460.           displayed.  When *END* is detected, the message "End of help, 
  7461.           PgUp for previous screen, any other key to continue..." is 
  7462.           displayed.  
  7463.  
  7464.         RETURNS:
  7465.                                
  7466.           TRUE if all is well. 
  7467.  
  7468.           FALSE if system has not been initialzied, the . HLP file can 
  7469.           not be found,  or the keyword passed could not be found in the 
  7470.           memory resident index.
  7471.  
  7472.         CAUTIONS and ADDITIONAL NOTES:
  7473.  
  7474.           None.
  7475.  
  7476.         SEE ALSO
  7477.  
  7478.           wn_hlinit
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.  
  7498.                                                            Page: 122
  7499.                                                      The Window BOSS
  7500.  
  7501.  
  7502.  
  7503.         10.61. wn_sleftj -- (string) left justify 
  7504.  
  7505.         USAGE
  7506.  
  7507.              wn_sleftj(str)
  7508.  
  7509.                   (char *) str - string to left justify
  7510.           
  7511.         RETURNS:
  7512.  
  7513.              Pointer to str.
  7514.           
  7515.         CAUTIONS and ADDITIONAL NOTES:
  7516.  
  7517.              The string str is left justified in place. 
  7518.  
  7519.              This funtion should not be used with literal character 
  7520.              strings (e.g. wn_sleft(" left justify this");).
  7521.  
  7522.              Leading white space is converted to trailing white space.
  7523.  
  7524.  
  7525.         10.62. wn_srightj -- (string) right justify 
  7526.  
  7527.         USAGE
  7528.  
  7529.              wn_srightj(str)
  7530.  
  7531.                   (char *) str - string to right justify.
  7532.  
  7533.         RETURNS:
  7534.  
  7535.              Pointer to str.
  7536.  
  7537.         CAUTIONS and ADDITIONAL NOTES:
  7538.  
  7539.              The string str is right justified in place.  
  7540.  
  7541.              This funtion should not be used with literal character 
  7542.              strings (e.g. wn_srightj("right justify this   ");).
  7543.  
  7544.              Trailing white space is converted to leading white space.
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.                                                            Page: 123
  7560.                                                      The Window BOSS
  7561.  
  7562.  
  7563.  
  7564.         10.63. wn_scenter -- (string) center 
  7565.  
  7566.         USAGE
  7567.  
  7568.              wn_scenter(sr,tr,w)
  7569.  
  7570.                   (char *) sr - the string to center - source
  7571.                   (char *) tr - the centered string  - target
  7572.                                 tr contains the results of centering
  7573.                   int w       - desired width of centered string 
  7574.           
  7575.         RETURNS:
  7576.  
  7577.              Pointer to tr.
  7578.           
  7579.         CAUTIONS and ADDITIONAL NOTES:
  7580.  
  7581.              tr must be a pointer to a character array of at least
  7582.              w+1 in size.
  7583.  
  7584.              The source string pointed to by sr is not altered in any 
  7585.              way.
  7586.  
  7587.              Both leading and trailing white space of the source string 
  7588.              are considered part of the string to be centered.
  7589.                                       
  7590.                                       Desired Width (W)
  7591.                         |------------------------------------------|
  7592.  
  7593.                   source "this is a simple example"
  7594.                   target|         this is a simple example         |
  7595.  
  7596.                   source "        this is an example toooo"
  7597.                   target|             this is an example toooo     |
  7598.  
  7599.              This fuction is intended to deal with strings that do not 
  7600.              have leading or trailing white space.  WN_SDELSPC can be 
  7601.              called to prepare the string for centering.
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620.                                                            Page: 124
  7621.                                                      The Window BOSS
  7622.  
  7623.  
  7624.  
  7625.         10.64. wn_sdelspc -- (string) delete leading/trailing spaces
  7626.  
  7627.         USAGE
  7628.  
  7629.              wn_sdelspc(str, code)
  7630.  
  7631.                   char *str - string to be treated
  7632.                   int code  - operation code:
  7633.                                 1 = delete leading
  7634.                                 2 = delete trailing
  7635.                                 3 = delete both
  7636.           
  7637.         RETURNS:
  7638.  
  7639.              Pointer to str.
  7640.  
  7641.         CAUTIONS and ADDITIONAL NOTES:
  7642.  
  7643.              All operations are performed in place.
  7644.  
  7645.              This funtion should not be used with literal character 
  7646.              strings (e.g. wn_sdelspc(" mumble fratz  ", 3);).
  7647.  
  7648.  
  7649.         10.65. wn_strndx -- (string) return index of s2 in s1
  7650.  
  7651.         USAGE
  7652.  
  7653.              wn_strndx(s1,s2,off)
  7654.  
  7655.                   (char *) s1 - pointer to string s1
  7656.                   (char *) s2 - pointer to string s2
  7657.                   int off     - s1 offset for search start
  7658.                     
  7659.         RETURNS:
  7660.  
  7661.              The index (a.k.a. subscript or offset) of where s2 begins in 
  7662.              s1, or (-1) if s2 could not be found in s1.
  7663.  
  7664.  
  7665.         CAUTIONS and ADDITIONAL NOTES:
  7666.  
  7667.              A value for "off" must be provided. 
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681.                                                            Page: 125
  7682.                                                      The Window BOSS
  7683.  
  7684.  
  7685.  
  7686.         10.66. mo_reset -- reset/init mouse
  7687.  
  7688.         USAGE
  7689.  
  7690.              ms = (MOUSEPTR) mo_reset()
  7691.              MOUSEPTR ms;
  7692.  
  7693.                   ms - mouse handle 
  7694.  
  7695.              mo_reset() must be the 1st mouse function called.
  7696.  
  7697.              Low level and applications level interface function.
  7698.  
  7699.         RETURNS
  7700.  
  7701.              mo = mouse handle or MOLPTR (null) if error
  7702.  
  7703.         CAUTIONS and ADDITIONAL NOTES
  7704.  
  7705.              Any program that uses a mouse must first initialize it in 
  7706.              order to avoid dealing with the mouse in an unknown state.  
  7707.              This function clears the mouse status to a "power on" state, 
  7708.              places the mouse's cursor in the center of the screen 
  7709.              (although hidden) and sets the mouse's active region to the 
  7710.              full screen.
  7711.  
  7712.              Requires "windows.h" to be "#include"d.
  7713.  
  7714.              MOUSEPTR is defined in "windows.h"     
  7715.  
  7716.              Example:
  7717.  
  7718.                   #include "windows.h"
  7719.                   main()
  7720.                   {
  7721.                   MOUSEPTR ms;
  7722.                        ms=mo_reset();           /* init mouse */
  7723.                        if(ms) {
  7724.                             .....               /* do other things */
  7725.                             exit(0);            /* finito */
  7726.                        }
  7727.                        else {
  7728.                             ... no mouse
  7729.                        }
  7730.                   }
  7731.                   /* End */
  7732.  
  7733.  
  7734.  
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.                                                            Page: 126
  7743.                                                      The Window BOSS
  7744.  
  7745.  
  7746.  
  7747.         10.67. mo_show -- show mouse
  7748.  
  7749.         USAGE
  7750.  
  7751.              mo_show(ms)
  7752.              MOUSEPTR ms;
  7753.  
  7754.                   ms - mouse handle
  7755.  
  7756.              Display (show, unhide) the mouse cursor.  
  7757.              
  7758.              Low level and applications level interface function.
  7759.  
  7760.         RETURNS
  7761.  
  7762.              Nothing.     
  7763.  
  7764.         CAUTIONS and ADDITIONAL NOTES
  7765.  
  7766.              Example:
  7767.  
  7768.                   #include "windows.h"
  7769.                   main()
  7770.                   {
  7771.                   MOUSEPTR ms;
  7772.                        ms=mo_reset();           /* init mouse */
  7773.                        if(ms) {
  7774.                             mo_show(ms);        /* show mouse */
  7775.                             .....               /* do other things */
  7776.                             exit(0);            /* finito */
  7777.                        }
  7778.                        else {
  7779.                             ... no mouse
  7780.                        }
  7781.                   }
  7782.                   /* End */
  7783.  
  7784.              Failure to call mo_show() will cause the mouse to never be 
  7785.              displayed.  mo_show() is usually called after mo_reset().
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.                                                            Page: 127
  7804.                                                      The Window BOSS
  7805.  
  7806.  
  7807.  
  7808.         10.68. mo_hide -- hide mouse
  7809.  
  7810.         USAGE
  7811.  
  7812.              mo_hide(ms)
  7813.              MOUSEPTR ms;
  7814.  
  7815.                   ms - mouse handle
  7816.  
  7817.              Hide (unshow, make invisible) the mouse cursor.  
  7818.  
  7819.              Low level and applications level interface function.
  7820.  
  7821.         RETURNS
  7822.  
  7823.              Nothing.
  7824.  
  7825.         CAUTIONS and ADDITIONAL NOTES
  7826.  
  7827.              The only way to display the mouse cursor after it is hidden 
  7828.              is by calling mo_show().
  7829.  
  7830.              Example:
  7831.  
  7832.                   #include "windows.h"
  7833.                   main()
  7834.                   {
  7835.                   MOUSEPTR ms;
  7836.                        ms=mo_reset();           /* init mouse */
  7837.                        if(ms) {
  7838.                             mo_show(ms);        /* show mouse */
  7839.                             v_getch();          /* wait for key hit */
  7840.                             mo_hide(ms);        /* hide mouse */
  7841.                             exit(0);            /* finito */
  7842.                        }
  7843.                        else {
  7844.                             ... no mouse
  7845.                        }
  7846.                   }
  7847.                   /* End */
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.                                                            Page: 128
  7865.                                                      The Window BOSS
  7866.  
  7867.  
  7868.  
  7869.         10.69. mo_pos -- get mouse pixel position & status
  7870.  
  7871.         USAGE
  7872.  
  7873.              mo_pos(ms)
  7874.              MOUSEPTR ms;
  7875.  
  7876.                   ms - mouse handle
  7877.  
  7878.              This function updates the mouse control block with current 
  7879.              mouse status information - physical location and button 
  7880.              status.  This information is provided in real time and in 
  7881.              the mouse's 640 x 200 pixel array corrdinate system.
  7882.  
  7883.              Low level interface function.
  7884.  
  7885.         RETURNS
  7886.  
  7887.              Nothing. 
  7888.  
  7889.              Updates - Members of the mouse control block:
  7890.  
  7891.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  7892.                            bit 1 set if right button is CURRENTLY down
  7893.                            bit 2 set if center button is CURRENTLY down
  7894.                                       
  7895.                ms->row   - mouse pixel row location 
  7896.                ms->col   - mouse pixel col location
  7897.  
  7898.         CAUTIONS and ADDITIONAL NOTES
  7899.  
  7900.              All information is reported in real time.  If the mouse is 
  7901.              in the process of being moved, the information returned may 
  7902.              not be indicative of the final destination. 
  7903.  
  7904.              This funtion is typically used in graphics mode (which The 
  7905.              Window BOSS does not support).  It is handy for "etch-a-
  7906.              sketch" type pixel drawing programs.  
  7907.  
  7908.              Making infrequent calls to this routine can cause your 
  7909.              program to miss button clicks. 
  7910.  
  7911.              Text (80x25) row and column coordinates can be determined by 
  7912.              dividing m->row and m->col by 8.
  7913.  
  7914.              The recommended way to obtain accurate information in a more 
  7915.              useful format is by using mo_wait in conjunction with 
  7916.              mo_rcpos.
  7917.  
  7918.  
  7919.              Also see "mo_rcpos", "mo_wait".
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.                                                            Page: 129
  7926.                                                      The Window BOSS
  7927.  
  7928.  
  7929.  
  7930.         10.70. mo_move -- move mouse pixel cursor
  7931.  
  7932.         USAGE
  7933.  
  7934.              mo_move(ms, row, col)
  7935.              MOUSEPTR ms;
  7936.              int row,col;
  7937.  
  7938.                   ms -  mouse handle
  7939.                   row - new pixel row value 
  7940.                   col - new pixel col value
  7941.  
  7942.              This function moves the mouse to a new physical location in 
  7943.              the mouse's 640 x 200 pixel array coordinate system.
  7944.  
  7945.              Low level interface function.
  7946.  
  7947.         RETURNS
  7948.  
  7949.              Nothing.
  7950.  
  7951.         CAUTIONS and ADDITIONAL NOTES
  7952.  
  7953.              Pixel row and column coordinates can be determined by 
  7954.              multiplying the text (80x25) coordinates by 8.  
  7955.  
  7956.              Also see "mo_locate".
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.                                                            Page: 130
  7987.                                                      The Window BOSS
  7988.  
  7989.  
  7990.  
  7991.         10.71. mo_pbinfo -- get pressed mouse botton status
  7992.  
  7993.         USAGE
  7994.  
  7995.              mo_pbinfo(ms,button)
  7996.              MOUSEPTR ms;
  7997.              int button;
  7998.  
  7999.                   ms     -  mouse handle
  8000.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8001.  
  8002.              Low level interface function.
  8003.  
  8004.         RETURNS
  8005.  
  8006.              Nothing. 
  8007.  
  8008.              Updates - Members of the mouse control block:
  8009.  
  8010.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  8011.                             bit 1 set if right button is CURRENTLY down
  8012.                             bit 2 set if center button is CURRENTLY down
  8013.                ms->nclick - number of times the requseted button has 
  8014.                             been pressed since last call.
  8015.                ms->row    - mouse pixel row location of last press
  8016.                ms->col    - mouse pixel col location of last press
  8017.  
  8018.         CAUTIONS and ADDITIONAL NOTES
  8019.  
  8020.              The mouse device driver is a pretty smart critter.  It keeps 
  8021.              track of a number of things, one of them being the number of 
  8022.              times a particular button has been pressed or released since 
  8023.              the last time someone has asked about it.  This function 
  8024.              returns pressed button information about a specific button 
  8025.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8026.              button status in the same format as mo_pos().  
  8027.  
  8028.              The ms->row and ms->column locations in the mouse control 
  8029.              block are from the last press of the specified button.
  8030.  
  8031.              This function, like mo_pos, provides limited value for most 
  8032.              applications programs.  A better choice is mo_rbinfo 
  8033.              (released button information and status), since the mouse 
  8034.              device driver waits for the user to RELEASE the specified 
  8035.              button before it updates the internal counters.
  8036.  
  8037.              MO_LEFT and MO_RIGHT are defined in "windows.h"
  8038.  
  8039.              Calling mo_pbinfo clears the mouse's pressed button history 
  8040.              counters.
  8041.  
  8042.              Also see "mo_press", "mo_release", "mo_rbinfo"
  8043.  
  8044.  
  8045.  
  8046.  
  8047.                                                            Page: 131
  8048.                                                      The Window BOSS
  8049.  
  8050.  
  8051.  
  8052.         10.72. mo_rbinfo -- get released mouse button status
  8053.  
  8054.              mo_rbinfo(ms,button)
  8055.              MOUSEPTR ms;
  8056.              int button;
  8057.  
  8058.                   ms     -  mouse handle
  8059.                   button -  button of interest (MO_LEFT or MO_RIGHT)
  8060.  
  8061.              Low level interface function.
  8062.  
  8063.         RETURNS
  8064.  
  8065.              Nothing. 
  8066.  
  8067.              Updates - Members of the mouse control block:
  8068.  
  8069.                ms->bstat  - bit 0 set if left has been released 
  8070.                             bit 1 set if right button has been released
  8071.                             bit 2 set if center button "   "    "
  8072.                ms->nclick - number of times the requseted button has 
  8073.                             been pressed and released since last call.
  8074.                ms->row    - mouse pixel row location of last release
  8075.                ms->col    - mouse pixel col location of last release 
  8076.  
  8077.         CAUTIONS and ADDITIONAL NOTES
  8078.  
  8079.              The mouse device driver is a pretty smart critter.  It keeps 
  8080.              track of a number of things, one of them being the number of 
  8081.              times a particular button has been pressed or released since 
  8082.              the last time someone has asked about it.  This function 
  8083.              returns released button information about a specific button 
  8084.              (MO_LEFT or MO_RIGHT), and it also returns the real time 
  8085.              button status in the same format as mo_pos().  
  8086.  
  8087.              The ms->row and ms->column locations in the mouse control 
  8088.              block are from the last button release  of the specified 
  8089.              button.
  8090.  
  8091.              The mouse device driver waits for the user to RELEASE the 
  8092.              specified button before it updates the internal counters.
  8093.  
  8094.              MO_LEFT and MO_RIGHT are defined in "windows.h"
  8095.  
  8096.              Calling mo_rbinfo clears the mouse's pressed button history 
  8097.              counters.
  8098.  
  8099.              Also see "mo_release", "mo_press", "mo_pbinfo"
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.                                                            Page: 132
  8109.                                                      The Window BOSS
  8110.  
  8111.  
  8112.  
  8113.         10.73. mo_clim -- set mouse min/max pixel column limits
  8114.  
  8115.         USAGE
  8116.  
  8117.              mo_clim(ms,min,max)
  8118.              MOUSEPTR ms;
  8119.              int min, mix;
  8120.  
  8121.                   ms   - mouse handle
  8122.                   min  - column minimum in pixels (0 to 639)
  8123.                   max  - column maximum in pixels (0 to 639)
  8124.  
  8125.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8126.              Together they define the mouse's hot area, or if you prefer, 
  8127.              they establish a fence/cage around the mouse. 
  8128.  
  8129.              Low level interface function.
  8130.  
  8131.         RETURNS
  8132.  
  8133.              Nothing.
  8134.  
  8135.         CAUTIONS and ADDITIONAL NOTES
  8136.  
  8137.              min and max are not range checked, 0 is on the left.
  8138.  
  8139.              Also see "mo_reigon"
  8140.  
  8141.         10.74. mo_rlim -- set mouse min/max pixel row limits
  8142.  
  8143.         USAGE
  8144.  
  8145.              mo_clim(ms,min,max)
  8146.              MOUSEPTR ms;
  8147.              int min, mix;
  8148.  
  8149.                   ms   - mouse handle
  8150.                   min  - row minimum in pixels (0 to 199)
  8151.                   max  - row maximum in pixels (0 to 199)
  8152.  
  8153.              mo_clim and mo_rlim limit the operational area of the mouse.  
  8154.              Together they define the mouse's hot area, or if you prefer, 
  8155.              they establish a fence/cage around the mouse. 
  8156.  
  8157.              Low level interface function.
  8158.  
  8159.         RETURNS
  8160.  
  8161.              Nothing.
  8162.  
  8163.         CAUTIONS and ADDITIONAL NOTES
  8164.  
  8165.              min and max are not range checked, 0 is at the top.
  8166.  
  8167.  
  8168.  
  8169.                                                            Page: 133
  8170.                                                      The Window BOSS
  8171.  
  8172.  
  8173.  
  8174.         10.75. mo_sgcursor -- set mouse graphics cursor
  8175.  
  8176.         USAGE
  8177.  
  8178.              mo_sgcursor(ms, hhot, vhot, seg, off)
  8179.              MOUSEPTR ms;
  8180.              int hhot, vhot;
  8181.              unsigned int seg, off;
  8182.  
  8183.                   ms         - mouse handle
  8184.                   hhot, vhot - X & Y relative coordinates of hot spot
  8185.                   seg, off   - segment and offset of mask set
  8186.  
  8187.              Low level interface function.
  8188.  
  8189.         RETURNS
  8190.  
  8191.              Nothing.
  8192.  
  8193.         CAUTIONS and ADDITIONAL NOTES
  8194.  
  8195.              This is an unsupported function that is useful in graphics 
  8196.              mode only.  
  8197.  
  8198.              This function is not to be used in conjunction with The 
  8199.              Window BOSS or Data Clerk.
  8200.  
  8201.              Refer to the Microsoft and/or Logitech API manuals for a 
  8202.              complete description of mouse function 9.
  8203.  
  8204.              Use "mo_scursor" or "mo_setptr" to set the mouse cursor.
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.                                                            Page: 134
  8231.                                                      The Window BOSS
  8232.  
  8233.  
  8234.  
  8235.         10.76. mo_scursor -- set mouse cursor
  8236.  
  8237.         USAGE
  8238.  
  8239.              mo_scursor(ms, type, start, stop)
  8240.              MOUSEPTR ms;
  8241.              int type, start, stop;
  8242.  
  8243.                   ms    - mouse pointer
  8244.                   type  - cursor type: 
  8245.                             MO_HDW for hardware
  8246.                             MO_SFT for software
  8247.                   start - start scan line
  8248.                   stop  - stop scan line
  8249.  
  8250.              When using a mouse, you can choose between two types of text 
  8251.              cursors, which are hardware or software.  The hardware 
  8252.              (MO_HDW) cursor puts the video adapters text cursor under 
  8253.              control of the mouse.  This results in a single cursor 
  8254.              appearing on the screen for both the mouse and text.  The 
  8255.              software cursor (MO_SFT) allows two cursors to appear on the 
  8256.              screen, the normal text cursor and a mouse cursor that can 
  8257.              take on a user defined shape and attribute.  The software 
  8258.              cursor is the default and is a simple full-cell inverse 
  8259.              video cursor.
  8260.  
  8261.              Using the hardware cursor type MO_HDW:
  8262.  
  8263.                   start - start scan line (usually 0)
  8264.                   stop  - stop scan line:
  8265.                             monochrome max = 12
  8266.                             non mon    max =  7
  8267.  
  8268.              Using the software cursor type MO_SFT:
  8269.  
  8270.                Option 1 (user defined):
  8271.                   
  8272.                   start - 0x00 
  8273.                   stop  - display attributes in upper 8 bits.
  8274.                           ASCII character to be used as cursor in lower 8 
  8275.                           bits.
  8276.  
  8277.                   For example, to set the software cursor to a white 
  8278.                   happy face on a black background:
  8279.  
  8280.                        mo_scursor(ms, MO_SFT, 0x00, 0x0703);     
  8281.  
  8282.  
  8283.                                                      continued...    
  8284.  
  8285.  
  8286.  
  8287.  
  8288.  
  8289.  
  8290.  
  8291.                                                            Page: 135
  8292.                                                      The Window BOSS
  8293.  
  8294.  
  8295.  
  8296.         mo_scursor - continued.
  8297.  
  8298.  
  8299.  
  8300.                Option 2 (see through rectangle):
  8301.  
  8302.                   start - 0x77ff
  8303.                   stop  - 0x00
  8304.  
  8305.                   For example, to set the software cursor to a see 
  8306.                   through block:
  8307.  
  8308.                        mo_scursor(ms, MO_SOFT, 0x77ff, 7700);     
  8309.  
  8310.              Low level interface function.
  8311.  
  8312.         RETURNS
  8313.  
  8314.              Nothing.
  8315.  
  8316.         CAUTIONS and ADDITIONAL NOTES
  8317.  
  8318.              See also "mo_setptr".
  8319.  
  8320.  
  8321.  
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.                                                            Page: 136
  8353.                                                      The Window BOSS
  8354.  
  8355.  
  8356.  
  8357.         10.77. mo_motion  -- get mouse motion counters
  8358.  
  8359.         USAGE
  8360.  
  8361.              mo_motion(ms)
  8362.              MOUSEPTR ms;
  8363.  
  8364.                   ms - mouse handle
  8365.  
  8366.              Low level interface function.
  8367.  
  8368.         RETURNS
  8369.  
  8370.              Nothing.
  8371.  
  8372.              Updates - Members of the mouse control block:
  8373.  
  8374.                ms->vmove - vertical move counter since last call
  8375.                ms->hmove - horizontal move counter since last call
  8376.  
  8377.         CAUTIONS and ADDITIONAL NOTES
  8378.  
  8379.              The mouse motion counters are reset after each call.
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.                                                            Page: 137
  8414.                                                      The Window BOSS
  8415.  
  8416.  
  8417.  
  8418.         10.78. mo_task -- define mouse event handler
  8419.  
  8420.         USAGE
  8421.  
  8422.              mo_task(m, mask, seg, off)
  8423.              WINDOWPTR m;
  8424.              unsigned int mask, seg, off;
  8425.  
  8426.                   m    - mouse handle
  8427.                   mask - event mask
  8428.                             BIT            EVENT
  8429.                              0             Mouse cursor moved
  8430.                              1             Left Button pressed
  8431.                              2             Left button released
  8432.                              3             Right button pressed
  8433.                              4             Right button released
  8434.                              5             Middle button pressed
  8435.                              6             Middle button released
  8436.                   seg  - segment address of handler routine
  8437.                   off  - offset portion of handler routine address
  8438.  
  8439.              This function, if properly implemented, can keep your code 
  8440.              free of frequent mouse checks.  The basic notion is to 
  8441.              "attach" a function in your program to the mouse device 
  8442.              driver.  This function would be invoked whenever any one of 
  8443.              the above events took place.  Your function would then 
  8444.              execute at interrupt level.  There are a few shortcomings, 
  8445.              however, your function can not perform any I/O, make any 
  8446.              calls to DOS or call any of the ROM BIOS routines.  What can 
  8447.              it do?  Actually not much other than record the fact than an 
  8448.              event took place and dismiss the interupt.  Your program can 
  8449.              then process the event at its convenience.  
  8450.  
  8451.              The difficulty with using this function is due to the fact 
  8452.              that your function MUST look like an interupt service 
  8453.              routine in both the way it beings and finishes executing.  
  8454.              This form of code generation is something most "C" compilers 
  8455.              are not very good at, and as a result most of these handler 
  8456.              routines have to be written in assembly language.  This 
  8457.              function is provided as a convenience to those who are 
  8458.              familar with writing these types of programs - it is not 
  8459.              supported by Star Guidance.
  8460.  
  8461.         RETURNS
  8462.  
  8463.              Nothing.
  8464.  
  8465.         CAUTIONS and ADDITIONAL NOTES
  8466.  
  8467.              This is an unsupported function.
  8468.  
  8469.              Refer to the Microsoft and/or Logitech API manuals for a 
  8470.              complete description of mouse function 12.
  8471.  
  8472.  
  8473.  
  8474.                                                            Page: 138
  8475.                                                      The Window BOSS
  8476.  
  8477.  
  8478.  
  8479.         10.79. mo_lpon -- mouse light pen emulation on
  8480.         10.80. mo_lpoff -- mouse light pen emulation off
  8481.  
  8482.         USAGE
  8483.  
  8484.              mo_lpon(ms)
  8485.              MOUSEPTR ms;
  8486.  
  8487.              mo_lpoff(ms)
  8488.              MOUSEPTR ms;
  8489.  
  8490.                   ms - mouse handle
  8491.  
  8492.              These functions allow software that exepects to find a light 
  8493.              pen to respond (or not to respond) to the mouse as if it 
  8494.              were a light pen.  By default, light pen emluation is 
  8495.              enabled - mo_reset() automatically turns on light pen 
  8496.              emulation.
  8497.  
  8498.              Low level and applications level interface function.
  8499.  
  8500.         RETURNS
  8501.  
  8502.              Nothing.
  8503.  
  8504.         CAUTIONS and ADDITIONAL NOTES
  8505.  
  8506.              None.
  8507.  
  8508.  
  8509.         10.81. mo_ratio -- set motion to pixel ratio
  8510.  
  8511.         USAGE
  8512.  
  8513.              mo_ratio(ms)
  8514.              MOUSEPTR ms;
  8515.  
  8516.                   ms - mouse handle
  8517.  
  8518.              Set the motion to pixel ratio (graphics mode).
  8519.  
  8520.              Low level interface function.
  8521.  
  8522.         RETURNS
  8523.  
  8524.              Nothing.
  8525.  
  8526.         CAUTIONS and ADDITIONAL NOTES
  8527.  
  8528.              This is an unsupported function.
  8529.  
  8530.              Refer to the Microsoft and/or Logitech API manuals for a 
  8531.              complete description of mouse function 15.
  8532.  
  8533.  
  8534.  
  8535.                                                            Page: 139
  8536.                                                      The Window BOSS
  8537.  
  8538.  
  8539.  
  8540.         10.82. mo_rcpos -- return current position of mouse
  8541.  
  8542.         USAGE
  8543.  
  8544.              mo_rcpos(ms, status, row, col)
  8545.              MOUSEPTR ms;
  8546.              int *status, *row, *col;
  8547.  
  8548.                   ms      - mouse handle
  8549.                   *status - pointer to int to receive mouse status
  8550.                               bit 0 set if left button is CURRENTLY down 
  8551.                               bit 1 set if right button is CURRENTLY down
  8552.                               bit 2 set if center button is CURRENTLY down
  8553.                   *row    - pointer to int to receive position
  8554.                             of mouse row (0-25)
  8555.                   *col    - pointer to int to receive position
  8556.                             of mouse column (0-79)
  8557.  
  8558.              Applications level interface function.
  8559.  
  8560.         RETURNS
  8561.  
  8562.              Nothing.
  8563.  
  8564.              Updates - Members of the mouse control block:
  8565.  
  8566.                ms->bstat - bit 0 set if left button is CURRENTLY down 
  8567.                            bit 1 set if right button is CURRENTLY down
  8568.                            bit 2 set if center button is CURRENTLY down
  8569.                                       
  8570.                ms->row   - mouse pixel row location 
  8571.                ms->col   - mouse pixel col location
  8572.  
  8573.  
  8574.                                                      continued....
  8575.  
  8576.  
  8577.  
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.  
  8585.  
  8586.  
  8587.  
  8588.  
  8589.  
  8590.  
  8591.  
  8592.  
  8593.  
  8594.  
  8595.  
  8596.                                                            Page: 140
  8597.                                                      The Window BOSS
  8598.  
  8599.  
  8600.  
  8601.         mo_rcpos - continued.
  8602.  
  8603.  
  8604.  
  8605.              CAUTIONS and ADDITIONAL NOTES
  8606.  
  8607.              Example:
  8608.  
  8609.                   #include "windows.h"
  8610.                   main()
  8611.                   {
  8612.                   MOUSEPTR ms;
  8613.                   int st, row, col;
  8614.                        ms=mo_reset();           /* init mouse */
  8615.                        if(ms) {
  8616.                                                 /* fetch status */
  8617.                             mo_rcpos(ms, &st, &row, &col);
  8618.                             mo_show(ms);        /* show mouse */
  8619.                             v_getch();          /* wait for key hit */
  8620.                             mo_hide(ms);        /* hide mouse */
  8621.                             exit(0);            /* finito */
  8622.                        }
  8623.                        else {
  8624.                             ... no mouse
  8625.                        }
  8626.                   }
  8627.                   /* End */
  8628.  
  8629.              Note the use of pointers.
  8630.  
  8631.              All information is reported in real time.  If the mouse is 
  8632.              in the process of being moved the information returned may 
  8633.              not be indicative of the final destination. 
  8634.  
  8635.              Making infrequent calls to this routine can cause your 
  8636.              program to miss button clicks. 
  8637.  
  8638.              The recommended way to obtain accurate information is by 
  8639.              using mo_wait in conjunction with mo_rcpos.
  8640.  
  8641.              See also mo_pos(), mo_wait()
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.                                                            Page: 141
  8658.                                                      The Window BOSS
  8659.  
  8660.  
  8661.  
  8662.         10.83. mo_locate -- locate (position) mouse cursor
  8663.  
  8664.         USAGE
  8665.  
  8666.              mo_locate(ms, row, col)
  8667.              MOUSEPTR ms;
  8668.              int row, col;
  8669.  
  8670.                   ms   - mouse handle
  8671.                   row  - destination row (0-24)
  8672.                   col  - destination column (0-79)
  8673.  
  8674.              mo_locate positions the mouse to the row and column 
  8675.              specified.
  8676.  
  8677.              Applications level interface function.
  8678.  
  8679.         RETURNS
  8680.  
  8681.              Nothing.
  8682.  
  8683.         CAUTIONS and ADDITIONAL NOTES
  8684.  
  8685.              Example:
  8686.  
  8687.                   #include "windows.h"
  8688.                   main()
  8689.                   {
  8690.                   MOUSEPTR ms;
  8691.                   int st, row, col;
  8692.                        ms=mo_reset();           /* init mouse */
  8693.                        if(ms) {
  8694.                                                 /* fetch status */
  8695.                             mo_rcpos(ms, &st, &row, &col);
  8696.                             if(row != 0)        /* home the mouse ?? */
  8697.                               mo_locate(ms, 0, 0);
  8698.                             mo_show(ms);        /* show mouse */
  8699.                             v_getch();          /* wait for key hit */
  8700.                             mo_hide(ms);        /* hide mouse */
  8701.                             exit(0);            /* finito */
  8702.                        }
  8703.                        else {
  8704.                             ... no mouse
  8705.                        }
  8706.                   }
  8707.                   /* End */
  8708.  
  8709.              Values are not range checked.
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.                                                            Page: 142
  8719.                                                      The Window BOSS
  8720.  
  8721.  
  8722.  
  8723.         10.84. mo_press -- get mouse button press status
  8724.  
  8725.         USAGE
  8726.  
  8727.              mo_press(ms, button, status, nclick, row, col)
  8728.              MOUSEPTR ms;
  8729.              int button;
  8730.              int *status, *nclick, *row, *col;
  8731.  
  8732.                   ms      - mouse handle
  8733.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  8734.                   status  - pointer to int to receive status information.
  8735.                               bit 0 set if left button is CURRENTLY down 
  8736.                               bit 1 set if right button is CURRENTLY down
  8737.                               bit 2 set if center button is CURRENTLY down
  8738.                   nclick  - pointer to int to receive number of times the 
  8739.                             mouse button specified by button has been 
  8740.                             pressed since last call. Zero indicates the 
  8741.                             button has not been pressed since the last 
  8742.                             call.
  8743.                   row     - pointer to int to receive row (0-24) of last 
  8744.                             button press.
  8745.                   col     - pointer to int to receive column (0-79) of 
  8746.                             last button press.
  8747.  
  8748.              Applications level interface function.
  8749.  
  8750.         RETURNS
  8751.  
  8752.              Nothing.
  8753.  
  8754.              Updates - Members of the mouse control block:
  8755.  
  8756.                ms->bstat  - bit 0 set if left button is CURRENTLY down 
  8757.                             bit 1 set if right button is CURRENTLY down
  8758.                             bit 2 set if center button is CURRENTLY down
  8759.                ms->nclick - number of times the requested button has been 
  8760.                             pressed since last call.
  8761.                ms->row    - mouse pixel row location of last press
  8762.                ms->col    - mouse pixel col location of last press
  8763.  
  8764.  
  8765.                                                      continued....
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.  
  8775.  
  8776.  
  8777.  
  8778.  
  8779.                                                            Page: 143
  8780.                                                      The Window BOSS
  8781.  
  8782.  
  8783.  
  8784.         mo_press - continued.
  8785.  
  8786.  
  8787.  
  8788.         CAUTIONS and ADDITIONAL NOTES
  8789.  
  8790.              Example:
  8791.  
  8792.                   #include "windows.h"
  8793.                   main()
  8794.                   {
  8795.                   MOUSEPTR ms;
  8796.                   int st, row, col;
  8797.                        ms=mo_reset();           /* init mouse */
  8798.                        if(ms) {
  8799.                                                 /* fetch status */
  8800.                           mo_rcpos(ms, &st, &row, &col);
  8801.                           if(row != 0)          /* home the mouse ?? */
  8802.                             mo_locate(ms, 0, 0);
  8803.                           mo_show(ms);          /* show mouse */
  8804.                           do {                  /* loop till press */
  8805.                             mo_wait(ms);        /* let mouse settle */
  8806.                             mo_press(ms, MO_LEFT, &st, &nc, &row, &col);
  8807.                           } while(!nc); 
  8808.                           mo_hide(ms);          /* hide mouse */
  8809.                           exit(0);              /* finito */
  8810.                        }
  8811.                        else {
  8812.                             ... no mouse
  8813.                        }
  8814.                   }
  8815.                   /* End */
  8816.  
  8817.              Note use of POINTERS.
  8818.  
  8819.              MO_LEFT and MO_RIGHT are defined in "windows.h"
  8820.  
  8821.              Calling mo_press clears the mouse's pressed button history 
  8822.              counters.
  8823.  
  8824.              Since mo_release waits for the mouse button to be released 
  8825.              before updating the device drivers internal tables, it is a 
  8826.              better choice for most applications.
  8827.  
  8828.              Also see "mo_pbinfo"
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.                                                            Page: 144
  8841.                                                      The Window BOSS
  8842.  
  8843.  
  8844.  
  8845.         10.85. mo_release -- get mouse button release status
  8846.  
  8847.         USAGE
  8848.  
  8849.              mo_release(ms, button, status, nclick, row, col)
  8850.              MOUSEPTR ms;
  8851.              int button;
  8852.              int *status, *nclick, *row, *col;
  8853.  
  8854.                   ms      - mouse handle
  8855.                   button  - button of interest (MO_LEFT or MO_RIGHT)
  8856.                   status  - pointer to int to receive status information.
  8857.                               bit 0 set if left button has been pressed 
  8858.                               and released.
  8859.                               bit 1 set if right button has been pressed 
  8860.                               and released.
  8861.                               bit 2 set if center button has been pressed 
  8862.                               and released.
  8863.                   nclick  - pointer to int to receive number of times the 
  8864.                             mouse button specified by button has been 
  8865.                             pressed and released since last call. Zero 
  8866.                             indicates the button has not been released
  8867.                             since the last call.
  8868.                   row     - pointer to int to receive row (0-24) of last 
  8869.                             button release.
  8870.                   col     - pointer to int to receive column (0-79) of 
  8871.                             last button release.
  8872.  
  8873.              Applications level interface function.
  8874.  
  8875.         RETURNS
  8876.  
  8877.              Nothing. 
  8878.  
  8879.              Updates - Members of the mouse control block:
  8880.  
  8881.                ms->bstat  - bit 0 set if left has been released 
  8882.                             bit 1 set if right button has been released
  8883.                             bit 2 set if center button "   "    "
  8884.                ms->nclick - number of times the requested button has been 
  8885.                             pressed and released since last call.
  8886.                ms->row    - mouse pixel row location of last release
  8887.                ms->col    - mouse pixel col location of last release 
  8888.  
  8889.  
  8890.                                                 continued....
  8891.  
  8892.  
  8893.  
  8894.  
  8895.  
  8896.  
  8897.  
  8898.  
  8899.  
  8900.  
  8901.                                                            Page: 145
  8902.                                                      The Window BOSS
  8903.  
  8904.  
  8905.  
  8906.         mo_release - continued.
  8907.  
  8908.  
  8909.  
  8910.         CAUTIONS and ADDITIONAL NOTES
  8911.  
  8912.              Example:
  8913.  
  8914.                   #include "windows.h"
  8915.                   main()
  8916.                   {
  8917.                   MOUSEPTR ms;
  8918.                   int st, nc, row, col;
  8919.                        ms=mo_reset();           /* init mouse */
  8920.                        if(ms) {
  8921.                                                 /* fetch status */
  8922.                           mo_rcpos(ms, &st, &row, &col);
  8923.                           if(row != 0)          /* home the mouse ?? */
  8924.                             mo_locate(ms, 0, 0);
  8925.                           mo_show(ms);          /* show mouse */
  8926.                           do {                  /* loop till release */
  8927.                             mo_wait(ms);        /* let mouse settle */
  8928.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  8929.                           } while(!nc); 
  8930.                           mo_hide(ms);          /* hide mouse */
  8931.                           exit(0);              /* finito */
  8932.                        }
  8933.                        else {
  8934.                             ... no mouse
  8935.                        }
  8936.                   }
  8937.                   /* End */
  8938.  
  8939.              Note use of POINTERS.
  8940.  
  8941.              The mouse device driver waits for the user to RELEASE the 
  8942.              specified button before it updates the internal counters.
  8943.  
  8944.              MO_LEFT and MO_RIGHT are defined in "windows.h"
  8945.  
  8946.              Calling mo_release clears the mouse's pressed button history 
  8947.              counters.
  8948.  
  8949.              Also see "mo_rbinfo", "mo_pbinfo", "mo_press"
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.                                                            Page: 146
  8963.                                                      The Window BOSS
  8964.  
  8965.  
  8966.  
  8967.         10.86. mo_reigon -- set mouse region
  8968.  
  8969.         USAGE
  8970.  
  8971.              mo_reigon(ms, row, col, width, height)
  8972.              MOUSEPTR ms;
  8973.              int row, col, width, height;
  8974.  
  8975.                   ms     - mouse pointer
  8976.                   row    - upper left hand corner row
  8977.                   col    - upper left hand corner column
  8978.                   width  - width of region (# of columns 1 to 80)
  8979.                   height - height of region (# of rows 1 to 25)
  8980.  
  8981.              mo_reigon defines the boundaries of where the mouse may 
  8982.              move.  Establishes a fence/cage around the mouse.
  8983.  
  8984.         RETURNS
  8985.  
  8986.              Nothing.
  8987.  
  8988.         CAUTIONS and ADDITIONAL NOTES
  8989.  
  8990.              Example:
  8991.  
  8992.                   #include "windows.h"
  8993.                   main()
  8994.                   {
  8995.                   MOUSEPTR ms;
  8996.                   int st, nc, row, col;
  8997.                        ms=mo_reset();           /* init mouse */
  8998.                        if(ms) {
  8999.                                                 /* fetch status */
  9000.                           mo_rcpos(ms, &st, &row, &col);
  9001.                           if(row != 0)          /* home the mouse ?? */
  9002.                             mo_locate(ms, 0, 0);
  9003.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9004.                           mo_show(ms);          /* show mouse */
  9005.                           do {                  /* loop till release */
  9006.                             mo_wait(ms);        /* let mouse settle */
  9007.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9008.                           } while(!nc); 
  9009.                           mo_hide(ms);          /* hide mouse */
  9010.                           exit(0);              /* finito */
  9011.                        }
  9012.                        else {
  9013.                             ... no mouse
  9014.                        }
  9015.                   }
  9016.                   /* End */
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.                                                            Page: 147
  9024.                                                      The Window BOSS
  9025.  
  9026.  
  9027.  
  9028.         10.87. mo_setptr -- set mouse pointer and attributes
  9029.  
  9030.         USAGE
  9031.  
  9032.              mo_setptr(ms, tchar, atrib)
  9033.              MOUSEPTR ms;
  9034.              unsigned int tchar, atrib;
  9035.  
  9036.                   ms    - mouse handle
  9037.                   tchar - character to be used as the mouse cursor, valid 
  9038.                           range is 0 to 255 although a value of 0 makes 
  9039.                           no sense at all!
  9040.                   atrib - attribute to be used.  The attribute byte 
  9041.                           contains the background specific data in the 
  9042.                           upper 4 bits and the foreground specific data 
  9043.                           in the lower 4 bits.  Color and bit definitions 
  9044.                           can be found in windows.h. You can use a 
  9045.                           statement as follows to set atrib:
  9046.  
  9047.                             atrib = (bground << 4 | fground);
  9048.  
  9049.         RETURNS
  9050.  
  9051.              Nothing.
  9052.  
  9053.         CAUTIONS and ADDITIONAL NOTES
  9054.  
  9055.              To set the mouse cursor to a white happy face on a backgound 
  9056.              use the following:
  9057.  
  9058.                   atrib = BLACK<<4 | WHITE;
  9059.                   mo_setptr(ms, 0x03, atrib);
  9060.  
  9061.              Attributes are defined in windows.h.
  9062.  
  9063.  
  9064.  
  9065.  
  9066.  
  9067.  
  9068.  
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.                                                            Page: 148
  9085.                                                      The Window BOSS
  9086.  
  9087.  
  9088.  
  9089.         10.88. mo_wait -- wait for mouse to settle
  9090.  
  9091.         USAGE
  9092.  
  9093.              mo_wait(ms)
  9094.              MOUSEPTR ms;
  9095.  
  9096.                   ms - mouse handle.
  9097.  
  9098.              Calling mo_wait causes your progam to pause until the mouse 
  9099.              has settled - completely stopped and with its buttons up and 
  9100.              no activity in progress.  
  9101.  
  9102.         RETURNS
  9103.  
  9104.              Nothing.
  9105.  
  9106.         CAUTIONS and ADDITIONAL NOTES
  9107.  
  9108.              Example:
  9109.  
  9110.                   #include "windows.h"
  9111.                   main()
  9112.                   {
  9113.                   MOUSEPTR ms;
  9114.                   int st, nc, row, col;
  9115.                   unsigned atrib;
  9116.                        ms=mo_reset();           /* init mouse */
  9117.                        if(ms) {                 /* fetch status */
  9118.                           mo_rcpos(ms, &st, &row, &col);
  9119.                           if(row != 0)          /* home the mouse ?? */
  9120.                             mo_locate(ms, 0, 0);
  9121.                           mo_reigon(ms, 0, 0, 40, 12); /* 40x12 */
  9122.                           atrib = BLACK<<4 | WHITE;
  9123.                           mo_setptr(ms, 0x03, atrib);
  9124.                           mo_show(ms);          /* show mouse */
  9125.                           do {                  /* loop till release */
  9126.                             mo_wait(ms);        /* let mouse settle */
  9127.                             mo_release(ms, MO_LEFT, &st, &nc, &row, &col);
  9128.                           } while(!nc); 
  9129.                           mo_hide(ms);          /* hide mouse */
  9130.                           exit(0);              /* finito */
  9131.                        }
  9132.                        else {
  9133.                             ... no mouse
  9134.                        }
  9135.                   }
  9136.                   /* End */
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.  
  9145.                                                            Page: 149
  9146.                                                      The Window BOSS
  9147.  
  9148.  
  9149.  
  9150.         10.89. mo_nbutt -- get mouse button count
  9151.  
  9152.         USAGE
  9153.  
  9154.              (int) mo_nbutt(ms)
  9155.              MOUSEPTR ms;
  9156.  
  9157.                   ms - mouse handle
  9158.  
  9159.         RETURNS
  9160.  
  9161.              Number of buttons on mouse.
  9162.  
  9163.         CAUTIONS and ADDITIONAL NOTES
  9164.  
  9165.              None.
  9166.  
  9167.  
  9168.  
  9169.  
  9170.  
  9171.  
  9172.  
  9173.  
  9174.  
  9175.  
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.  
  9206.                                                            Page: 150
  9207.                                                      The Window BOSS
  9208.  
  9209.  
  9210.  
  9211.         10.90. _getca -- get character and attribute
  9212.  
  9213.         USAGE
  9214.  
  9215.           unsigned int _getca(page, row, col)
  9216.           int page, row, col;
  9217.  
  9218.  
  9219.                 page - video page #
  9220.                 row -  row value (0-24)
  9221.                 col -  column value (0-79)
  9222.  
  9223.           _getca fetches the character and attribute at the screen 
  9224.           coordinates defined by row and column.  _getca is a general 
  9225.           purpose routine and can be used outside of the window 
  9226.           environment.
  9227.  
  9228.         RETURNS
  9229.  
  9230.           The character and attribute as an unsigned int.  The attribute 
  9231.           is in the upper byte, the character is in the lower byte.
  9232.  
  9233.         CAUTIONS and ADDITIONAL NOTES
  9234.  
  9235.           None.
  9236.  
  9237.  
  9238.  
  9239.         10.91. _putca -- put character and attribute 
  9240.  
  9241.         USAGE
  9242.  
  9243.           _putca(page, atch, row, col);
  9244.           int page, row, col;
  9245.           unsigned atch;
  9246.  
  9247.                 page - video page #
  9248.                 atch - attribute and character
  9249.                          attribute in high order byte
  9250.                          character in low order byte
  9251.                 row -  row position for character (0-24)
  9252.                 col -  column position for character (0-79)
  9253.  
  9254.           _putch is a general purpose routine that can be used outside of 
  9255.           the window environment.
  9256.  
  9257.         RETURNS
  9258.  
  9259.           Nothing.
  9260.  
  9261.         CAUTIONS and ADDITIONAL NOTES
  9262.  
  9263.           None.
  9264.  
  9265.  
  9266.  
  9267.                                                            Page: 151
  9268.                                                      The Window BOSS
  9269.  
  9270.  
  9271.  
  9272.         10.92. _vidblt -- video block transfer
  9273.  
  9274.         USAGE
  9275.  
  9276.           _vidblt(sseg, soff, dseg, doff, n);
  9277.           unsigned sseg, soff, dseg, doff;
  9278.           int n;
  9279.  
  9280.                 sseg - source segment
  9281.                 soff - source offset
  9282.                 dseg - destination segment
  9283.                 doff - destination offset
  9284.                 n -    number of bytes to BLT
  9285.  
  9286.           _vidblt is similar to the lattice movedata() function except 
  9287.           that it waits for the video retrace signal before performing 
  9288.           the block transfer.
  9289.  
  9290.           _vidblt is a general purpose function that can be used outside 
  9291.           of the window environment.
  9292.  
  9293.         RETURNS
  9294.  
  9295.           Nothing
  9296.  
  9297.         CAUTIONS and ADDITIONAL NOTES
  9298.  
  9299.           For use in color systems only.
  9300.  
  9301.           _vidblt references wn_sbit.
  9302.  
  9303.  
  9304.  
  9305.         10.93. v_spage -- set active display page
  9306.  
  9307.         USAGE
  9308.  
  9309.           v_spage(page)
  9310.           int page;
  9311.  
  9312.                 page - video page to switch the display to
  9313.  
  9314.           v_spage is a general purpose routine that can be used outside 
  9315.           of the window environment.  
  9316.  
  9317.         RETURNS
  9318.  
  9319.           Nothing.
  9320.  
  9321.         CAUTIONS and ADDITIONAL NOTES
  9322.  
  9323.           Color card only.
  9324.  
  9325.  
  9326.  
  9327.  
  9328.                                                            Page: 152
  9329.                                                      The Window BOSS
  9330.  
  9331.  
  9332.  
  9333.         10.94. v_cls -- clear entire video screen 
  9334.  
  9335.         USAGE
  9336.  
  9337.           v_cls(atrib)
  9338.           int atrib;
  9339.  
  9340.                 atrib - attribute to be used 
  9341.  
  9342.           v_cls clears the entire video screen to the specified attribute 
  9343.           and places the cursor in the upper left hand corner of the 
  9344.           screen.
  9345.  
  9346.           v_cls is a general purpose routine that can be used outside of 
  9347.           the window environment.
  9348.  
  9349.           Attributes are defined in windows.h.
  9350.  
  9351.         RETURNS
  9352.  
  9353.           Nothing.
  9354.  
  9355.         CAUTIONS and ADDITIONAL NOTES
  9356.  
  9357.           References Window BOSS globals defined in "windows.ext".
  9358.  
  9359.  
  9360.  
  9361.         10.95. v_smode -- set video mode
  9362.  
  9363.         USAGE
  9364.  
  9365.           v_smode(mode)
  9366.           int mode;
  9367.  
  9368.                 mode - mode to set the display to
  9369.  
  9370.           v_smode is a general purpose routine which can be used outside 
  9371.           of the window environment.
  9372.  
  9373.           Modes are defined in windows.h.
  9374.  
  9375.         RETURNS
  9376.  
  9377.           Nothing.
  9378.  
  9379.         CAUTIONS and ADDITIONAL NOTES
  9380.  
  9381.           None.
  9382.  
  9383.  
  9384.  
  9385.  
  9386.  
  9387.  
  9388.  
  9389.                                                            Page: 153
  9390.                                                      The Window BOSS
  9391.  
  9392.  
  9393.  
  9394.         10.96. v_wca -- write character and attribute
  9395.  
  9396.         USAGE
  9397.  
  9398.           v_wca(page, char, atrib, count);
  9399.           int page, char, atrib, count;
  9400.  
  9401.                 page -  video page #
  9402.                 char -  character to write
  9403.                 atrib - attribute to use
  9404.                 count - number of times to repeat
  9405.  
  9406.           v_wca writes the character defined by char count times starting 
  9407.           at the current cursor location.     
  9408.  
  9409.           v_wca is a general purpose routine that can be used outside of 
  9410.           the window environment. 
  9411.  
  9412.           Attributes are defined in windows.h.
  9413.  
  9414.         RETURNS
  9415.  
  9416.           Nothing.
  9417.  
  9418.         CAUTIONS and ADDITIONAL NOTES
  9419.  
  9420.           None.
  9421.  
  9422.  
  9423.  
  9424.         10.97. v_wtty -- write character TTY mode
  9425.  
  9426.         USAGE
  9427.  
  9428.           v_wtty(char);
  9429.           int  char;
  9430.  
  9431.                 char -  character to write
  9432.  
  9433.         v_wtty writes the character defined by char at the current cursor 
  9434.         location.  
  9435.  
  9436.           v_wtty is a general purpose routine that can be used outside of 
  9437.           the window environment. 
  9438.  
  9439.         RETURNS
  9440.  
  9441.           Nothing.
  9442.  
  9443.         CAUTIONS and ADDITIONAL NOTES
  9444.  
  9445.           None.
  9446.  
  9447.  
  9448.  
  9449.  
  9450.                                                            Page: 154
  9451.                                                      The Window BOSS
  9452.  
  9453.  
  9454.  
  9455.         10.98. v_locate -- locate (position) cursor
  9456.  
  9457.         USAGE
  9458.  
  9459.           v_locate(page, row, col);
  9460.           int page, row, col;
  9461.  
  9462.                 page - video page #
  9463.                 row  - row to position to
  9464.                 col  - column to position to
  9465.           
  9466.           v_locate positions the cursor to the absolute coordinates 
  9467.           specified by row and col on the specified page.  The upper left 
  9468.           hand corner of the screen is (0,0).
  9469.  
  9470.           v_locate is a general purpose routine that can be used outside 
  9471.           of the window environment.
  9472.  
  9473.           Row and Col are range checked.  You CAN position the cursor 
  9474.           slightly (25,80) off the screen.
  9475.  
  9476.         RETURNS
  9477.  
  9478.           Nothing.
  9479.  
  9480.         CAUTIONS and ADDITIONAL NOTES
  9481.  
  9482.           References Window BOSS globals defined in "windows.ext".
  9483.  
  9484.  
  9485.  
  9486.         10.99. v_hidec -- hide cursor
  9487.  
  9488.         USAGE
  9489.  
  9490.           v_hidec();
  9491.  
  9492.           The physical cursor is located off the screen.
  9493.  
  9494.           This function does not affect any virtual cursor coordinates, 
  9495.           it simply hides the physical cursor from view.
  9496.  
  9497.         RETURNS
  9498.  
  9499.           Nothing.
  9500.  
  9501.         CAUTIONS and ADDITIONAL NOTES
  9502.  
  9503.           References Window BOSS globals defined in "windows.ext".
  9504.  
  9505.  
  9506.  
  9507.  
  9508.  
  9509.  
  9510.  
  9511.                                                            Page: 155
  9512.                                                      The Window BOSS
  9513.  
  9514.  
  9515.  
  9516.         10.100. v_sctype -- set cursor type (style)
  9517.  
  9518.         USAGE
  9519.  
  9520.           v_sctype(type, start, end);
  9521.           int type, start, end;
  9522.  
  9523.                 type -  cursor style code 
  9524.                         (0=hidden, 1=normal, 2=slow, 3=fast)
  9525.                 start - start scan line
  9526.                 end -   end scan line
  9527.  
  9528.           As an example, to set a slow flashing block style cursor invoke 
  9529.           this function with type=1, start=6, and end=12 (color card).
  9530.  
  9531.         RETURNS
  9532.  
  9533.           Nothing.
  9534.  
  9535.         CAUTIONS and ADDITIONAL NOTES
  9536.  
  9537.           Color and Monochrome adapters only. 
  9538.           Not for use on the 3270 PC or Enhanced Graphics Adapters.
  9539.  
  9540.  
  9541.         10.101. v_sapu -- scroll active display page up
  9542.  
  9543.         USAGE
  9544.  
  9545.           v_sapu(nl, rul, cul, rlr, clr, atrib);
  9546.           int nl, rul, cul, rlr, clr, atrib;
  9547.  
  9548.                 nl  - number of lines to scroll
  9549.                 rul - row of upper left hand corner of scroll area
  9550.                 cul - column of upper left hand corner of scroll area
  9551.                 rlr - row of lower right corner of scroll area
  9552.                 clr - column of lower right corner of scroll area
  9553.                 atrib - attribute to be used for blanking
  9554.  
  9555.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  9556.           the entire video screen use v_sapu(0, 0, 0, 24, 79, NORMAL).
  9557.  
  9558.           v_sapu is a general purpose routine that can be used outside of 
  9559.           the window environment.  
  9560.  
  9561.           Attributes are defined in windows.h.
  9562.  
  9563.         RETURNS
  9564.  
  9565.           Nothing.
  9566.  
  9567.         CAUTIONS and ADDITIONAL NOTES
  9568.  
  9569.           None.
  9570.  
  9571.  
  9572.                                                            Page: 156
  9573.                                                      The Window BOSS
  9574.  
  9575.  
  9576.  
  9577.         10.102. v_sapd -- scroll active display page down
  9578.  
  9579.         USAGE
  9580.  
  9581.           v_sapd(nl, rul, cul, rlr, clr, atrib);
  9582.           int nl, rul, cul, rlr, clr, atrib;
  9583.  
  9584.                 nl  - number of lines to scroll
  9585.                 rul - row of upper left hand corner of scroll area
  9586.                 cul - column of upper left hand corner of scroll area
  9587.                 rlr - row of lower right corner of scroll area
  9588.                 clr - column of lower right corner of scroll area
  9589.                 atrib - attribute to be used for blanking
  9590.  
  9591.           v_sapd is a general purpose routine that can be used outside of 
  9592.           the window environment.  
  9593.  
  9594.           A value of 0 for nl scrolls (blanks) the entire area.  To clear 
  9595.           the entire video screen use v_sapd(0, 0, 0, 24, 79, NORMAL).
  9596.  
  9597.           Attributes are defined in windows.h.
  9598.  
  9599.         RETURNS
  9600.  
  9601.           Nothing.
  9602.  
  9603.         CAUTIONS and ADDITIONAL NOTES
  9604.  
  9605.           None.
  9606.  
  9607.  
  9608.         10.103. v_rcpos -- return current cursor position
  9609.  
  9610.         USAGE
  9611.  
  9612.           v_rcpos(page, row, col);
  9613.           int page;
  9614.           int *row, *col;       /* POINTERS */
  9615.  
  9616.                 int page - video page #     
  9617.                 int *row - pointer to int to receive row value
  9618.                 int *col - pointer to int to receive column value
  9619.  
  9620.           v_rcpos is a general purpose routine that can be used outside 
  9621.           of the window environment.  
  9622.  
  9623.         RETURNS
  9624.  
  9625.           Nothing.
  9626.  
  9627.         CAUTIONS and ADDITIONAL NOTES
  9628.  
  9629.           None.
  9630.  
  9631.  
  9632.  
  9633.                                                            Page: 157
  9634.                                                      The Window BOSS
  9635.  
  9636.  
  9637.  
  9638.         10.104. v_rcvs -- return current video state
  9639.  
  9640.         USAGE
  9641.  
  9642.           v_rcvs(page, vm, cols);
  9643.           int *page, *vm, *cols;        /* POINTERS */
  9644.  
  9645.                 int *page - pointer to int to receive current video page #
  9646.                 int *vm   - pointer to int to receive current video mode
  9647.                 int *cols - pointer to int to receive current screen width
  9648.           
  9649.           v_rcvs is a general purpose routine that can be used outside of 
  9650.           the window environment.
  9651.  
  9652.           Modes are defined in windows.h.
  9653.  
  9654.         RETURNS
  9655.  
  9656.           Nothing.
  9657.  
  9658.         CAUTIONS and ADDITIONAL NOTES
  9659.  
  9660.           None.
  9661.  
  9662.  
  9663.  
  9664.         10.105. v_getch -- get keyboard character and scan code
  9665.  
  9666.         USAGE
  9667.  
  9668.           v_getch();
  9669.  
  9670.           v_getch is a general purpose routine that can be used outside 
  9671.           of the window environment.
  9672.  
  9673.         RETURNS
  9674.  
  9675.           The character and scan code.  The character is in the low order 
  9676.           byte, the scan code in the high order byte.
  9677.  
  9678.         CAUTIONS and ADDITIONAL NOTES
  9679.  
  9680.           v_getch waits for a key to be struck.
  9681.  
  9682.  
  9683.  
  9684.  
  9685.  
  9686.  
  9687.  
  9688.  
  9689.  
  9690.  
  9691.  
  9692.  
  9693.  
  9694.                                                            Page: 158
  9695.                                                      The Window BOSS
  9696.  
  9697.  
  9698.  
  9699.         10.106. v_kstat -- get keyboard status
  9700.  
  9701.         USAGE
  9702.  
  9703.           v_kstat();
  9704.  
  9705.           v_kstat is a general purpose routine that can be used outside 
  9706.           of the window environment.
  9707.  
  9708.         RETURNS
  9709.  
  9710.           TRUE if a character is available, FALSE if not.
  9711.  
  9712.         CAUTIONS and ADDITIONAL NOTES
  9713.  
  9714.           None.
  9715.  
  9716.  
  9717.  
  9718.         10.107. v_kflush -- flush keyboard buffer
  9719.  
  9720.         USAGE
  9721.  
  9722.           v_kflush();
  9723.  
  9724.           v_kflush clears the keyboard buffer of any pending input.
  9725.  
  9726.         RETURNS
  9727.  
  9728.           Nothing.
  9729.  
  9730.         CAUTIONS and ADDITIONAL NOTES
  9731.  
  9732.           None.
  9733.  
  9734.  
  9735.  
  9736.         10.108. v_border -- set border color
  9737.  
  9738.         USAGE
  9739.  
  9740.           v_border(color)
  9741.           int color;
  9742.  
  9743.              Set overscan border to specified color. 
  9744.  
  9745.         RETURNS
  9746.  
  9747.           Nothing.
  9748.  
  9749.         CAUTIONS and ADDITIONAL NOTES
  9750.  
  9751.           None.
  9752.  
  9753.  
  9754.  
  9755.                                                            Page: 159
  9756.                                                      The Window BOSS
  9757.  
  9758.  
  9759.  
  9760.         11. Registration Form
  9761.  
  9762.  
  9763.  
  9764.  
  9765.  
  9766.                                 Registration Form
  9767.  
  9768.                             Star Guidance Consulting
  9769.                                  273 Windy Drive 
  9770.                           Waterbury, Connecticut 06705
  9771.                                  (203) 574-2449
  9772.  
  9773.  
  9774.            Company Name:       _______________________________________
  9775.  
  9776.            Name:               _______________________________________
  9777.  
  9778.            Address:            _______________________________________
  9779.  
  9780.                                _______________________________________
  9781.  
  9782.            City, State, Zip:   _______________________________________
  9783.  
  9784.            Country:            _______________________________________
  9785.  
  9786.            Phone:              _______________________________________  
  9787.  
  9788.  
  9789.                   ___ Library Source @ $55.00 USD      $________._____
  9790.                   ___ Shareware      @ $20.00 USD      $________._____
  9791.                       Shipping (Outside USA) $5.00 USD $________._____
  9792.                       Shipping (USA)         $4.00 USD $________._____
  9793.                       Connecticut Sales Tax 8.0%       $_______4.40___ *
  9794.                       (Connecticut residents only)  * 
  9795.                                            TOTAL ------>________._____
  9796.  
  9797.  
  9798.            MasterCard/Visa: ______________________ Exp Date: ____/____
  9799.            (Circle one)
  9800.  
  9801.            Printed Name:    ______________________
  9802.            (On Card)
  9803.                    
  9804.            Signature:       ______________________ Date:____/____/____
  9805.            (Of Card Holder)
  9806.  
  9807.            All funds must be in US Dollars, Call for UPS COD (USA only),
  9808.            Personal and Company Checks Accepted. All checks must be drawn 
  9809.            against a US Bank and payable in US Dollars.
  9810.  
  9811.  
  9812.  
  9813.  
  9814.  
  9815.  
  9816.                                                            Page: 160
  9817.                                                      The Window BOSS
  9818.  
  9819.  
  9820.  
  9821.  
  9822.         A
  9823.         ASMFILES.LZH, 30, 31
  9824.         Aztec C, 50
  9825.         AZTEC.LZH, 30, 31
  9826.         azvlib.asm, 56
  9827.  
  9828.         B
  9829.         Basics
  9830.           Forms, 4
  9831.           Mouse, 19
  9832.           Windows, 4
  9833.         BIOS, 47
  9834.         Borland Turbo C, 49
  9835.         BOSS_DOC.LZH, 26, 27
  9836.         BOSS_LB1.LZH, 26, 27, 28, 40
  9837.         BOSS_LB2.LZH, 26, 28
  9838.         BOSS_LB3, 29
  9839.         BOSS_LB3.LZH, 26, 27
  9840.         BOSS_LB4, 29
  9841.         BOSS_LB4.LZH, 26, 27
  9842.         BOSS_SUP.LZH, 26, 27, 28, 40
  9843.         Bulletin Board
  9844.           Files, 26
  9845.           Support, 26
  9846.  
  9847.         C
  9848.         C86.LZH, 30, 31
  9849.         CFILES.LZH, 30, 32, 33
  9850.  
  9851.         D
  9852.         Data Entry (Basics), 6
  9853.         Datalight C, 49
  9854.         DEMO.LZH, 30
  9855.         DLC.LZH, 30, 35
  9856.         dlvlib.asm, 56
  9857.         DOC.LZH, 30
  9858.         dos.mac, 56
  9859.  
  9860.         E
  9861.         Express C, 50
  9862.  
  9863.         F
  9864.         fields, 23
  9865.         FLASH, 47
  9866.         forms, 23
  9867.           closing, 23
  9868.         Forms (Basics), 7
  9869.  
  9870.         G
  9871.         GENINDEX, 14, 15, 17, 121
  9872.         Globals, 47
  9873.  
  9874.  
  9875.  
  9876.  
  9877.                                                            Page: 161
  9878.                                                      The Window BOSS
  9879.  
  9880.  
  9881.  
  9882.         H
  9883.         Help System
  9884.           Basics, 14
  9885.           Notes, 16, 17
  9886.  
  9887.         I
  9888.         INCLUDE Files, 41, 42
  9889.  
  9890.         L
  9891.         Lattice C, 50
  9892.         LC3.LZH, 30, 34
  9893.         LC6.LZH, 34
  9894.         LDATA, 56
  9895.         LHARC.DOC, 30
  9896.         LHARC.EXE, 30
  9897.         LHAR_DOC.LZH, 26
  9898.         LPROG, 56
  9899.         LWIN.LIB, 40
  9900.         LZH Files, 26
  9901.  
  9902.         M
  9903.         macros.asm, 56
  9904.         Microsoft C, 48
  9905.         Microsoft Quick C, 48
  9906.         mitem, 9
  9907.         Mix Power C, 49
  9908.         MIX.LZH, 30, 34
  9909.         model.h, 56
  9910.         Mouse (Basics), 19, 20, 21
  9911.         mo_clim, 133
  9912.         mo_hide, 128
  9913.         mo_locate, 142
  9914.         mo_lpoff, 139
  9915.         mo_lpon, 139
  9916.         mo_motion, 137
  9917.         mo_move, 130
  9918.         mo_nbutt, 150
  9919.         mo_pbinfo, 131
  9920.         mo_pos, 129
  9921.         mo_press, 143
  9922.         mo_ratio, 139
  9923.         mo_rbinfo, 132
  9924.         mo_rcpos, 140
  9925.         mo_reigon, 147
  9926.         mo_release, 145
  9927.         mo_reset, 126
  9928.         mo_rlim, 133
  9929.         mo_scursor, 135
  9930.         mo_setptr, 148
  9931.         mo_sgcursor, 134
  9932.         mo_show, 127
  9933.         mo_task, 138
  9934.         mo_wait, 149
  9935.         MS5.LZH, 30, 36
  9936.  
  9937.  
  9938.                                                            Page: 162
  9939.                                                      The Window BOSS
  9940.  
  9941.  
  9942.  
  9943.         MS6.LZH, 30, 36
  9944.         MSQC.LZH, 30
  9945.         MSQC20.LZH, 37
  9946.         MSQC25.LZH, 37
  9947.         msvlib.asm, 56
  9948.         MWIN.MIX, 40
  9949.  
  9950.         P
  9951.         PAINT, 47
  9952.         pcvlib.asm, 56
  9953.         pmenu, 9, 10, 11
  9954.         Popup Menus (Basics), 8
  9955.  
  9956.         R
  9957.         REVHST.LZH, 30
  9958.  
  9959.         S
  9960.         Shareware Diskette, 26
  9961.         Source Diskette, 26
  9962.         Support, 2
  9963.         Support Services, 2
  9964.         SWIN.LIB, 40
  9965.  
  9966.         T
  9967.         TC2.LZH, 30, 35
  9968.  
  9969.         V
  9970.         video attributes, 22
  9971.         vlib.asm, 56
  9972.         v_border, 159
  9973.         v_cls, 153
  9974.         v_getch, 158
  9975.         v_hidec, 155
  9976.         v_kflush, 159
  9977.         v_kstat, 159
  9978.         v_locate, 155
  9979.         v_rcpos, 157
  9980.         v_rcvs, 158
  9981.         v_sapd, 157
  9982.         v_sapu, 156
  9983.         v_sctype, 156
  9984.         v_smode, 153
  9985.         v_spage, 152
  9986.         v_wca, 154
  9987.         v_wtty, 154
  9988.  
  9989.         W
  9990.         Watcom C, 50
  9991.         WATCOM.LZH, 30, 39
  9992.         wcvlib.asm, 56
  9993.         window handles, 22
  9994.         window origin, 22
  9995.  
  9996.  
  9997.  
  9998.  
  9999.                                                            Page: 163
  10000.                                                      The Window BOSS
  10001.  
  10002.  
  10003.  
  10004.         windows
  10005.           closing, 23
  10006.           overlapping, 24
  10007.           tiled, 24
  10008.         Windows (Basics), 5
  10009.         WINDOWS.C, 47
  10010.         WINDOWS.EXT, 41, 42, 47
  10011.         WINDOWS.FN5, 41
  10012.         WINDOWS.FN6, 41
  10013.         WINDOWS.FNS, 41, 42
  10014.         WINDOWS.FNZ, 41
  10015.         WINDOWS.H, 41, 42
  10016.         wns_escape, 47
  10017.         wn_activate, 75
  10018.         wn_boxset, 80
  10019.         wn_close, 67
  10020.         wn_clr, 75
  10021.         wn_color, 76
  10022.         wn_dborder, 81
  10023.         wn_delrow, 74
  10024.         wn_dma, 79
  10025.         wn_dmaflg, 47
  10026.         wn_dmode, 47, 61
  10027.         wn_dtext, 114
  10028.         wn_exit, 60
  10029.         wn_fixcsr, 79
  10030.         wn_frmcls, 89
  10031.         wn_frmget, 88
  10032.         wn_frmopn, 87
  10033.         wn_gatext, 96
  10034.         wn_gbool, 112
  10035.         wn_gdate, 90
  10036.         wn_gdouble, 110
  10037.         wn_gets, 72
  10038.         wn_gfloat, 108
  10039.         wn_gint, 100
  10040.         wn_glong, 104
  10041.         wn_gltext, 96
  10042.         wn_gphone, 94
  10043.         wn_gpword, 98
  10044.         wn_gtext, 96
  10045.         wn_gtime, 92
  10046.         wn_guint, 102
  10047.         wn_gulong, 106
  10048.         wn_gutext, 96
  10049.         wn_help, 122
  10050.         wn_hlinit, 14, 15, 119
  10051.         wn_iemsg, 115
  10052.         wn_ihmsg, 116
  10053.         wn_init, 60
  10054.         wn_input, 82
  10055.         wn_insrow, 74
  10056.         wn_locate, 69
  10057.         wn_move, 68
  10058.  
  10059.  
  10060.                                                            Page: 164
  10061.                                                      The Window BOSS
  10062.  
  10063.  
  10064.  
  10065.         wn_natrib, 80
  10066.         wn_open, 62
  10067.         wn_pmenu, 12
  10068.         wn_popup, 8, 11, 117
  10069.         wn_printf, 70
  10070.         wn_psinit, 60
  10071.         wn_putc, 71
  10072.         wn_putca, 73
  10073.         wn_puts, 71
  10074.         wn_putsa, 73
  10075.         wn_qpopup, 8, 12, 118
  10076.         wn_restore, 68
  10077.         wn_save, 67
  10078.         wn_sbit, 47
  10079.         wn_scenter, 124
  10080.         wn_scroll, 47, 78
  10081.         wn_sdelspc, 125
  10082.         wn_shkey, 82, 83, 116
  10083.         wn_sleftj, 123
  10084.         wn_srightj, 123
  10085.         wn_stitla, 66
  10086.         wn_stitle, 65
  10087.         wn_strndx, 125
  10088.         wn_sync, 77
  10089.         wn_titla, 64
  10090.         wn_title, 64
  10091.         wn_wrap, 77
  10092.  
  10093.         X
  10094.         XMWIN.LIB, 40
  10095.  
  10096.         Z
  10097.         Zortec C, 49
  10098.         ZTC.LZH, 30, 38
  10099.  
  10100.         _
  10101.         _getca, 151
  10102.         _putca, 151
  10103.         _vidblt, 152
  10104.  
  10105.  
  10106.  
  10107.  
  10108.  
  10109.  
  10110.  
  10111.  
  10112.  
  10113.  
  10114.  
  10115.  
  10116.  
  10117.  
  10118.  
  10119.  
  10120.  
  10121.                                                            Page: 165
  10122.